Bug 30710 - Background tasks can be called multiple times on batch item deletion
Summary: Background tasks can be called multiple times on batch item deletion
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 29346 30467
Blocks: 30725 30727 30728
  Show dependency treegraph
 
Reported: 2022-05-06 13:00 UTC by Nick Clemens
Modified: 2023-12-28 20:43 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30710: Build holds queue once per biblio when batch deleting items (3.09 KB, patch)
2022-05-06 14:45 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30710: Build holds queue once per biblio when batch deleting items (3.16 KB, patch)
2022-05-06 15:06 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30710: Regression tests (2.81 KB, patch)
2022-05-10 14:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30710: Build holds queue once per biblio when batch deleting items (3.21 KB, patch)
2022-05-10 14:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30710: (QA follow-up) Add POD (1.18 KB, patch)
2022-05-10 14:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-05-06 13:00:32 UTC
When batch deleting items and deleting biblios we can end up processing a single bib in the queue more than once, we should avoid this
Comment 1 Jonathan Druart 2022-05-06 13:18:58 UTC
This is a bug.
Comment 2 Nick Clemens 2022-05-06 13:22:30 UTC
This also impacts background ES indexing

To test:
1 - Find a record with multiple items
2 - On details page click 'delete items in a batch'
3 - Delete items
4 - Check background jobs list
5 - Note one reindex per item deleted, plus a non backgrounded deletion from index if record deleted
Comment 3 Jonathan Druart 2022-05-06 13:25:28 UTC
(In reply to Nick Clemens from comment #2)
> This also impacts background ES indexing

It's fixed on master (or patch is in PQA queue), search for "task does not deal with indexation correctly"
Comment 4 Nick Clemens 2022-05-06 14:45:42 UTC
Created attachment 134742 [details] [review]
Bug 30710: Build holds queue once per biblio when batch deleting items
Comment 5 Martin Renvoize 2022-05-06 15:06:05 UTC
Created attachment 134743 [details] [review]
Bug 30710: Build holds queue once per biblio when batch deleting items

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2022-05-06 15:06:30 UTC
Great work, clear fix.  Signing off
Comment 7 David Nind 2022-05-06 21:39:08 UTC
Changing status to signed off.
Comment 8 Tomás Cohen Arazi 2022-05-10 14:46:14 UTC
Created attachment 134817 [details] [review]
Bug 30710: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi 2022-05-10 14:46:19 UTC
Created attachment 134818 [details] [review]
Bug 30710: Build holds queue once per biblio when batch deleting items

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi 2022-05-10 14:46:25 UTC
Created attachment 134819 [details] [review]
Bug 30710: (QA follow-up) Add POD

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Fridolin Somers 2022-05-11 08:49:15 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄