Comment 19 for bug 1596595

Bill Erickson (berick) wrote :

Chris encountered a bug when testing where holds with lots of copies across a wide variety of circ libs can result in a transaction timeout as a large set of org unit settings is fetched on the non-transaction editor. Fix pushed to same branch which forces all org setting lookups to occur on the in-transaction editor when one is provided. This has the secondary benefit of causing org setting lookups (from the child targeter) to avoid a CONNECT dance for each.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=2771cbe124221842271c0b06c9b517fe6673256b

A secondary optimization not implemented here would be a batch org setting lookup DB func, similar to actor.org_unit_ancestor_setting_batch, that accepts multiple org units instead of (or in addition to) multiple setting names. Something like this could reduce the number of cstore calls significantly in these cases. I mention this as a possible addition, not as a requirement for this bug.