https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43989 Sam Young <sam.young@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210375|0 |1 is obsolete| | --- Comment #6 from Sam Young <sam.young@bywatersolutions.com> --- Created attachment 210376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210376&action=edit Bug 43989: Prevent concurrent holds queue updates from dropping holds When two holds queue updates for the same record run at the same time, one can fail with a deadlock or lock wait timeout and is never retried, so the hold stays off the Holds queue. To test: 1. Enable RealTimeHoldsQueue and restart_all 2. Place a hold on a record with one available item, pickup at the item's library 3. Go to Circulation > Holds queue and confirm the hold is listed 4. In a terminal, open koha-mysql kohadev and run: BEGIN; DELETE FROM hold_fill_targets WHERE biblionumber=<the record's biblionumber>; Leave it open, this acts like another holds queue update running for the record 5. In the staff interface, edit the item (e.g. add a public note) and save 6. Wait 1 minute after saving (more than 50 seconds, less than 2 minutes), then run ROLLBACK; in the mysql terminal 7. Go to Administration > Manage jobs and open the latest "Holds queue update" job 8. Observe "Some errors occurred" with "Lock wait timeout exceeded", the update failed and was not retried 9. Apply patch and restart_all 10. Repeat steps 4-7 11. Observe "Holds queue successfully updated", the update waited for the lock, retried and succeeded 12. prove t/db_dependent/Koha/BackgroundJob/BatchUpdateBiblioHoldsQueue.t 13. Observe that all tests pass -- You are receiving this mail because: You are watching all bug changes.