Description
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.
queue/queue/abstract/driver/fifo.lua
Lines 158 to 173 in aa7c092
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).
queue/queue/abstract/driver/fifo.lua
Lines 101 to 117 in aa7c092
### Tasks
- [ ] `fifo`
- [ ] `fifottl`
- [ ] `utube`
- [ ] `utubettl`