You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kick method is used to unbury several tasks in the tube. After analyzing this method for drivers fifo, fifottl, utube, utubettl, I came to the conclusion, that it still possible to get a data race and incorrect, unexpected result.
We take a task with minimal task_id and BURIED status. After that we are updating it, commiting. But lua can also yield before WAL write. So this very task could also be taken in a parallel kick call for the second time.
Possible fix: do changes inside a transaction, like in put, take methods. But there is a subtle point here (which is described in a comment below).
kick
method is used to unbury several tasks in the tube. After analyzing this method for driversfifo
,fifottl
,utube
,utubettl
, I came to the conclusion, that it still possible to get a data race and incorrect, unexpected result.queue/queue/abstract/driver/fifo.lua
Lines 158 to 173 in aa7c092
We take a task with minimal
task_id
andBURIED
status. After that we are updating it, commiting. But lua can also yield before WAL write. So this very task could also be taken in a parallelkick
call for the second time.Possible fix: do changes inside a transaction, like in
put
,take
methods. But there is a subtle point here (which is described in a comment below).queue/queue/abstract/driver/fifo.lua
Lines 101 to 117 in aa7c092
Tasks
The text was updated successfully, but these errors were encountered: