Embedded copy attrs eats acq and actor drones

Bug #2003973 reported by Tiffany Little
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
New
High
Unassigned

Bug Description

Seen on our production server after our 3.10 upgrade, and I've checked it against a master server.

In acq/lineitem/copy-attrs.component.html, there's a limitPerms restriction on the org select, as well as a permfilter on the shelving location select. This seems innocuous enough. BUT NO!

Because copy-attrs is embedded into the PO, if you do an ExpandAll to show all of your line item details, it will call open-ils.actor open-ils.actor.user.has_work_perm_at.batch once, for each perm checked (there are three: CREATE_PURCHASE ORDER, and CREATE_PICKLIST twice), for each line item detail.

On a test PO that I created on my test server, I had 3 line items with 5 copies each. So doing Expand All resulted in 45 actor calls.

Because this is eating up all our actor drones, we're getting whitescreens for everyone so I'm setting this bug's priority to High.

I have a patch that just simply removes these perm checks from the org select and the shelving location select. With patch installed, no extraneous actor calls just from expanding line items. I don't think there should be an access issue with doing that, since I think if you've gotten that far into the PO then you've already passed essential checks like VIEW_PURCHASE_ORDER.

Revision history for this message
Tiffany Little (tslittle) wrote :
Changed in evergreen:
importance: Undecided → High
tags: added: pullrequest
Revision history for this message
Tiffany Little (tslittle) wrote :

I'm going to remove my pullrequest for now, because it's an imprecise band-aid on what's happening. It's not spamming actor drones anymore, but acq drones are eaten up almost instantly. When I went to copy-attrs.component.ts to line 228 (fieldIsDisabled) and added a console log of "evaluated true", I got a TON of "evaluated true" in the console just by expanding all. I got the same number when I go into Items on an on-order PO (which is also using copy-attrs.html).

Best guess right now is that each field checks if it should be read-only based on the value of fieldIsDisabled. So for each line item detail * 6 it does the evaluation.

I'm going to assign this to myself because I'm actively working on it, but enlightenment is more than welcome.

tags: removed: pullrequest
Changed in evergreen:
assignee: nobody → Tiffany Little (tslittle)
summary: - Combobox perm checks spamming actor drones
+ Embedded copy attrs eats acq and actor drones
tags: added: parallel-requests
Changed in evergreen:
assignee: Tiffany Little (tslittle) → nobody
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.