[Bug 41248] New: Add ability for real time holds queue background jobs to skip duplicate jobs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Bug ID: 41248 Summary: Add ability for real time holds queue background jobs to skip duplicate jobs Initiative type: --- Sponsorship --- status: Product: Koha Version: 25.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It seems inefficient to rebuild the holds queue repeatedly for the same record. We should skip enqueuing BatchUpdateBiblioHoldsQueue jobs if there is already a queued job that hasn't started. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 --- Comment #1 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 189567 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189567&action=edit Bug 41248: Add ability for real time holds queue background jobs to skip duplicate jobs (edit) It seems inefficient to rebuild the holds queue repeatedly for the same record. We should skip enqueuing BatchUpdateBiblioHoldsQueue jobs if there is already a queued job that hasn't started. Test Plan: 1) Enable real time holds queue 2) Ensure the default queue background job worker is not running 3) Set up 2 or more holds for the record 4) Alter the priority for those holds a couple times 5) Confirm only one new job is in the background_jobs table for that record. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch --- Comment #2 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- It seems inefficient to rebuild the holds queue repeatedly for the same record. We should skip enqueuing BatchUpdateBiblioHoldsQueue jobs if there is already a queued job that hasn't started. Test Plan: 1) Enable real time holds queue 2) Ensure the default queue background job worker is not running 3) Set up 2 or more holds for the record 4) Alter the priority for those holds a couple times 5) Confirm only one new job is in the background_jobs table for that record. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 --- Comment #3 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 189569 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189569&action=edit Bug 41248: Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 --- Comment #4 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 189570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189570&action=edit Bug 41248: Add ability for real time holds queue background jobs to skip duplicate jobs It seems inefficient to rebuild the holds queue repeatedly for the same record. We should skip enqueuing BatchUpdateBiblioHoldsQueue jobs if there is already a queued job that hasn't started. Test Plan: 1) Enable real time holds queue 2) Ensure the default queue background job worker is not running 3) Set up 2 or more holds for the record 4) Alter the priority for those holds a couple times 5) Confirm only one new job is in the background_jobs table for that record. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 --- Comment #5 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 189571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189571&action=edit Bug 41248: Add unit tests Patch from commit fadb037 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 --- Comment #6 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- It seems inefficient to rebuild the holds queue repeatedly for the same record. We should skip enqueuing BatchUpdateBiblioHoldsQueue jobs if there is already a queued job that hasn't started. Test Plan: 1) Enable real time holds queue 2) Ensure the default queue background job worker is not running 3) Set up 2 or more holds for the record 4) Alter the priority for those holds a couple times 5) Confirm only one new job is in the background_jobs table for that record. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189567|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189569|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189570|0 |1 is obsolete| | --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 189581 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189581&action=edit Bug 41248: Add ability for real time holds queue background jobs to skip duplicate jobs It seems inefficient to rebuild the holds queue repeatedly for the same record. We should skip enqueuing BatchUpdateBiblioHoldsQueue jobs if there is already a queued job that hasn't started. Test Plan: 1) Enable real time holds queue 2) Ensure the default queue background job worker is not running 3) Set up 2 or more holds for the record 4) Alter the priority for those holds a couple times 5) Confirm only one new job is in the background_jobs table for that record. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189571|0 |1 is obsolete| | --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 189582 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189582&action=edit Bug 41248: Add unit tests Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Failing QA until supply a follow-up patch to add an index to background_jobs.data. On a server with 762052 background_jobs entries, the queries take over 1.5 seconds each, which seems like a long time to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 --- Comment #10 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 189593 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189593&action=edit Bug 41248: Add index on background_jobs.data Index decreases search result time from 1.6 seconds to 0.001 seconds on 153,205 rows Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189593|0 |1 is obsolete| | --- Comment #11 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 189594 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189594&action=edit Bug 41248: Add index on background_jobs.data Index decreases search result time from 1.6 seconds to 0.001 seconds on 153,205 rows Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41248 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version|25.05 |Main -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org