Bug 37035

Summary: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall (khall) <kyle>
Status: Failed QA --- QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: major    
Priority: P5 - low CC: emily.lamancusa, kyle, martin.renvoize, mspinney
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37037
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 37035: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled
Bug 37035: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled
Bug 37035: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled
Bug 37035: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled

Description Kyle M Hall (khall) 2024-06-05 14:53:06 UTC
If RealTimeHoldsQueue is on, merging authorities triggers a update_holds_queue_for_biblios background job for each affected record. This can result in thousands of unnecessary queued jobs since this change will not affect hold-ability. In a large catalog this can be a crippling number of background jobs that will delay more important jobs.
Comment 1 Kyle M Hall (khall) 2024-06-05 14:56:17 UTC
Created attachment 167444 [details] [review]
Bug 37035: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled

If RealTimeHoldsQueue is on, merging authorities triggers a update_holds_queue_for_biblios background job for each affected record. This can result in thousands of unnecessary queued jobs since this change will not affect hold-ability. In a large catalog this can be a crippling number of background jobs that will delay more important jobs.

Test Plan:
1) Enable RealTimeHoldsQueue
2) Merge authorities with merge_authorities.pl
3) Note a update_holds_queue_for_biblios background job is queued for each record touched
4) Apply this match
5) Merge authorities again
6) Note that no update_holds_queue_for_biblios jobs were queued
Comment 2 Kyle M Hall (khall) 2024-06-05 14:59:15 UTC
Created attachment 167445 [details] [review]
Bug 37035: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled

If RealTimeHoldsQueue is on, merging authorities triggers a update_holds_queue_for_biblios background job for each affected record. This can result in thousands of unnecessary queued jobs since this change will not affect hold-ability. In a large catalog this can be a crippling number of background jobs that will delay more important jobs.

Test Plan:
1) Enable RealTimeHoldsQueue
2) Merge authorities with merge_authorities.pl
3) Note a update_holds_queue_for_biblios background job is queued for each record touched
4) Apply this match
5) Merge authorities again
6) Note that no update_holds_queue_for_biblios jobs were queued
Comment 3 Matt Blenkinsop 2024-06-05 15:35:20 UTC
Created attachment 167456 [details] [review]
Bug 37035: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled

If RealTimeHoldsQueue is on, merging authorities triggers a update_holds_queue_for_biblios background job for each affected record. This can result in thousands of unnecessary queued jobs since this change will not affect hold-ability. In a large catalog this can be a crippling number of background jobs that will delay more important jobs.

Test Plan:
1) Enable RealTimeHoldsQueue
2) Merge authorities with merge_authorities.pl
3) Note a update_holds_queue_for_biblios background job is queued for each record touched
4) Apply this match
5) Merge authorities again
6) Note that no update_holds_queue_for_biblios jobs were queued

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 4 Emily Lamancusa (emlam) 2024-06-12 13:49:07 UTC
Small, logical change. Code looks good and QA tool passes. Passing QA
Comment 5 Emily Lamancusa (emlam) 2024-06-12 13:58:49 UTC
Created attachment 167662 [details] [review]
Bug 37035: Merging authorities triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled

If RealTimeHoldsQueue is on, merging authorities triggers a update_holds_queue_for_biblios background job for each affected record. This can result in thousands of unnecessary queued jobs since this change will not affect hold-ability. In a large catalog this can be a crippling number of background jobs that will delay more important jobs.

Test Plan:
1) Enable RealTimeHoldsQueue
2) Merge authorities with merge_authorities.pl
3) Note a update_holds_queue_for_biblios background job is queued for each record touched
4) Apply this match
5) Merge authorities again
6) Note that no update_holds_queue_for_biblios jobs were queued

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 6 Martin Renvoize (ashimema) 2024-06-13 12:32:05 UTC
Any chance of a unit test here Kyle?  Prevent a future regression and all that ;P