Skip to content

Commit 29d1a25

Browse files
FizikRootLeonidVas
authored andcommitted
fix worker iteration for a tree index
Before the patch, during the worker iteration (in case of using a tree index) an array of tuples for check on expiration was obtained before suspending, and some tuples can be modified / deleted from another fiber while the worker fiber is sleeping. Now an array of tuples for check on expiration obtained just before checking.
1 parent 5bf3e34 commit 29d1a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

expirationd.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ local function tree_index_iter(scan_space, task)
9494
for _, tuple in ipairs(tuples) do
9595
expiration_process(task, tuple)
9696
end
97+
suspend(scan_space, task)
9798
local key = construct_key(scan_space.id, last_id)
9899
tuples = scan_space.index[0]:select(key, params)
99-
suspend(scan_space, task)
100100
end
101101

102102
end

0 commit comments

Comments
 (0)