[Koha-bugs] [Bug 33287] Race condition in Koha::BackgroundJob?

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 21 16:20:41 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33287

Janusz Kaczmarek <januszop at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aleisha at catalyst.net.nz

--- Comment #4 from Janusz Kaczmarek <januszop at gmail.com> ---
(In reply to Nick Clemens from comment #3)
> It may also be this one then:
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33019
> 
> It's another race condition due to the transaction

Thank you for this hint.  However, it seems that the case reported and patched
by Aleisha is still only the tip of the iceberg.  It seems to me that not only
creation a new record causes this issue.  Our findings of today are that it
happens (i.e. "No job found for id=nnn" in worker-output.log) also when for
instance a user renews his checkouts.

What if, in background_jobs_worker.pl, we waited like 500 ms (100 ms?) before
calling Koha::BackgroundJobs->find ?

Or maybe, in Koha::BackgroundJob::enqueue, calling in loop ->in_storage after
->store would give us green light to proceed further to call
$conn->send_with_receipt ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list