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.
5
5
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## [ Unreleased]
9
+
10
+ ### Fixed
11
+
12
+ - Too long timings in the ` utubettl ` driver (#223 )
13
+
8
14
## [ 1.4.0] - 2024-05-20
9
15
10
16
The 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)
305
305
elseif stat then
306
306
processed = err
307
307
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
313
314
end
314
315
end
315
316
end
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ test:test('ttr put/take', function(test)
123
123
local my_queue = queue .create_tube (' trr_test' , ' utubettl' , { engine = engine })
124
124
test :ok (my_queue :put (' ttr1' , { ttr = 1 }), ' put ttr task' )
125
125
test :ok (my_queue :take (0.1 ) ~= nil , ' take this task' )
126
- fiber .sleep (1.5 )
126
+ fiber .sleep (1.1 )
127
127
local task = my_queue :peek (0 )
128
128
test :is (task [2 ], state .READY , ' Ready state returned after one second' )
129
129
@@ -132,7 +132,7 @@ test:test('ttr put/take', function(test)
132
132
{ engine = engine , storage_mode = queue .driver .utubettl .STORAGE_MODE_READY_BUFFER })
133
133
test :ok (my_queue_ready :put (' ttr1' , { ttr = 1 }), ' put ttr task' )
134
134
test :ok (my_queue_ready :take (0.1 ) ~= nil , ' take this task' )
135
- fiber .sleep (1.5 )
135
+ fiber .sleep (1.1 )
136
136
local task = my_queue_ready :peek (0 )
137
137
test :is (task [2 ], state .READY , ' Ready state returned after one second' )
138
138
end
You can’t perform that action at this time.
0 commit comments