Comment 20 for bug 1596595

Revision history for this message
Bill Erickson (berick) wrote :

I have pushed 2 more commits to address the final paragraph from my previous comment.

1. Adds a DB function actor.org_unit_ancestor_setting_batch_by_org(setting_name, org1, org2, ...)
which returns org settings for a list of org units, an AppUtils function to invoke the DB function, and a Perl live test to exercise the code.

2. A commit to the hold targeter to use the new batch function when looking up values for the circ.holds.org_unit_target_weight and circ.holds.target_when_closed settings.

This primarily affects single-use targeting, like placement time targeting, checkin retargeting, etc.

For example, from Chris's issue in my previous comment, the in-transaction cstore timed out waiting on the parent cstore to make 238 cstore calls to get values for the circ.holds.org_unit_target_weight setting for every circ lib. (In this case, there were targetable copies at all of those circ libs). With the new code, those 238 cstore calls will be handled with 1 batch call.