Skip to content

Commit a681590

Browse files
oleg-jukovecLeonidVas
authored andcommitted
driver: fix yield in fifottl/utubettl
After 1000 processed tuples an iteration fiber yields after each processed tuple. The problem was fixed by resetting a counter of processed tuples without yield. Closes #208
1 parent ea8449b commit a681590

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

queue/abstract/driver/fifottl.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ local function fifottl_fiber_iteration(self, processed)
144144
if estimated > 0 or processed > 1000 then
145145
-- free refcounter
146146
estimated = estimated > 0 and estimated or 0
147+
processed = 0
147148
self.cond:wait(estimated)
148149
end
149150

queue/abstract/driver/utubettl.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ local function utubettl_fiber_iteration(self, processed)
152152
-- free refcounter
153153
estimated = processed > 1000 and 0 or estimated
154154
estimated = estimated > 0 and estimated or 0
155+
processed = 0
155156
self.cond:wait(estimated)
156157
end
157158

0 commit comments

Comments
 (0)