open-ils.cat.asset.copy_tree.retrieve.authoritative eats all my cstore's
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.10 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Evergreen 2.11
Authoritative API calls instruct the CStoreEditor to conduct all communication with open-ils.cstore over a connected channel (so transactions can be used). The authoritative wrapper then instructs all still-open cstore connections to rollback and disconnect when the API call is complete. The end result is that cstore connections opened in this fashion (without any knowledge of the guts of the API code) are left connected for the duration of the API call. If enough cstore connections are created during API execution, it can exhaust a server's allotment of open-ils.cstore processes.
In the case of open-ils.
The solution is to share an editor connection instead of creating a new one per org unit. This should also have the effect of making the API faster overall.
A similar issue was diagnosed in the hold details API:
Patch en route.
Changed in evergreen: | |
milestone: | 2.11.2 → 2.11.3 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To test via srfsh using concerto data:
1. In one terminal:
% tail -f osrfsys.log | grep transaction.begin
2. In another terminal:
srfsh% request open-ils.cat open-ils. cat.asset. copy_tree. retrieve. authoritative "AUTHTOKEN", 217, [1,2,3,4,5,6,7,8,9]
3. 9 cstore transactions are opened before patching. After patching, only 1 is created.
===
Fix pushed:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ berick/ lp1653742- copy-tree- authoritative- eats-cstores