Batch fine generator caching/parallel optimizations user/berick/fine-gen-cache-parallel
authorBill Erickson <berickxx@gmail.com>
Wed, 5 Jul 2017 16:21:51 +0000 (12:21 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 21 Jul 2017 15:05:03 +0000 (11:05 -0400)
commitfce288da56bf6f4700cd7ce096b82bbb303c8968
tree285940d99f1a10fb49673ba38187a518f693c99d
parent40f820cd23345ca8e4bb6caf249f6ffe52afe94c
Batch fine generator caching/parallel optimizations

* Fine generator caches org unit setting values per instance.  Once
  cached, the number of cstore calls per transaction is reduced by
  3 to 5 calls, depending on settings, when running in batch mode.

* Fine generator disconnects from cstore after processing each
  transaction giving cstores a chance to recycle and avoid memory
  gobbling on huge batches.

* Fine generator now collects parallel batches of transactions directly
  within the server-side generator API instead of requiring the caller
  to collect transactions up front for individual processing.  This lets
  us take advantage of the new org setting caching.

* Fine generator script improvements:
** Arguments are passed via GetOpt, with support for legacy-style
   opensrf config and lockfile name passing (with warning).
** supports a --parallel option to override the value from opensrf.xml.
** Sets OSRF_LOG_CLIENT for log tracing.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
Open-ILS/src/support-scripts/fine_generator.pl