Use batch method when adding users to bucket

Bug #1946531 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.7
Fix Released
Medium
Unassigned
3.8
Fix Released
Medium
Unassigned

Bug Description

EG 3.7

The fix for bug 1913458 added a new open-ils.actor.container.item.create.batch method, which allows us to avoid open-ils.actor drone exhaustion when adding many items to a bucket. However, so far we're only using this method for record buckets. We should use it for user buckets too.

tags: added: parallel-requests
Revision history for this message
Galen Charlton (gmc) wrote :

Noting that open-ils.actor drone exhaustion due to user bucket actions has been observed in production.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

As a specific example, we recently had a library add over 1400 users to a user bucket all at once (apparently in order to update accounts affected by Covid closures). If we serialize the requests, adding that many users to a bucket would be unreasonably slow, hence the need for a batch method.

Changed in evergreen:
assignee: nobody → Jeff Davis (jdavis-sitka)
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1946531-batch-add-to-user-bucket has a fix:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeffdavis/lp1946531-batch-add-to-user-bucket

How to test:

1. Get a CSV file of patron barcodes. The number of barcodes should exceed open-ils.actor max_children (default is 15).
2. Go to User Buckets > Pending Users tab. Upload the barcode file, select all rows, then do Actions > Add To Bucket. This will max our your open-ils.actor drones.
3. Apply the fix and restart the open-ils.actor service.
4. Repeat step 2 above. This time, you should not see a spike in open-ils.actor drones.

tags: added: pullrequest
Changed in evergreen:
assignee: Jeff Davis (jdavis-sitka) → nobody
milestone: none → 3.9.1
milestone: 3.9.1 → none
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

Tested. Signoff here:

user/gmcharlt/lp1946531-batch-add-to-user-bucket-signoff / https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/gmcharlt/lp1946531-batch-add-to-user-bucket-signoff

The signoff branch includes a follow-up to display the progress bar during the operation.

Changed in evergreen:
assignee: Galen Charlton (gmc) → nobody
tags: added: signedoff
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Works well for me! Thank you, Jeff and Galen! Pushed to 3.7 and above.

Changed in evergreen:
status: New → Fix Committed
importance: Undecided → Medium
milestone: none → 3.9.1
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.