File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
66and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ Unreleased]
9+
10+ ### Fixed
11+
12+ - Too long timings in the ` utubettl ` driver (#223 )
13+
814## [ 1.4.0] - 2024-05-20
915
1016The release introduces an experimental ` storage_mode ` option for the ` utube `
Original file line number Diff line number Diff line change @@ -305,11 +305,12 @@ local function utubettl_fiber(self)
305305 elseif stat then
306306 processed = err
307307 end
308- end
309-
310- if self .sync_chan :get (0.1 ) ~= nil then
311- log .info (" Queue utubettl fiber was stopped" )
312- break
308+ else
309+ -- When switching the master to the replica, the fiber will be stopped.
310+ if self .sync_chan :get (0.1 ) ~= nil then
311+ log .info (" Queue utubettl fiber was stopped" )
312+ break
313+ end
313314 end
314315 end
315316end
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ test:test('ttr put/take', function(test)
123123 local my_queue = queue .create_tube (' trr_test' , ' utubettl' , { engine = engine })
124124 test :ok (my_queue :put (' ttr1' , { ttr = 1 }), ' put ttr task' )
125125 test :ok (my_queue :take (0.1 ) ~= nil , ' take this task' )
126- fiber .sleep (1.5 )
126+ fiber .sleep (1.1 )
127127 local task = my_queue :peek (0 )
128128 test :is (task [2 ], state .READY , ' Ready state returned after one second' )
129129
@@ -132,7 +132,7 @@ test:test('ttr put/take', function(test)
132132 { engine = engine , storage_mode = queue .driver .utubettl .STORAGE_MODE_READY_BUFFER })
133133 test :ok (my_queue_ready :put (' ttr1' , { ttr = 1 }), ' put ttr task' )
134134 test :ok (my_queue_ready :take (0.1 ) ~= nil , ' take this task' )
135- fiber .sleep (1.5 )
135+ fiber .sleep (1.1 )
136136 local task = my_queue_ready :peek (0 )
137137 test :is (task [2 ], state .READY , ' Ready state returned after one second' )
138138 end
You can’t perform that action at this time.
0 commit comments