(no title)
kdps
|
2 years ago
I don't get it :(. Why could the same task be executed more than once? From my understanding, if the UPDATE is atomic, only one worker will be able to set `used = 1`. If the update statement is not successful (affected != 1), then the worker should drop the task and do another select.
klauserc|2 years ago
Why would both transactions see `used = 0`? The DB server tries to isolate transactions and actively hides effects of other transactions that have not committed yet.
singron|2 years ago
https://www.postgresql.org/docs/current/transaction-iso.html...