TPAC bucket item retrieval operates in streaming mode
authorBill Erickson <berick@esilibrary.com>
Tue, 9 Apr 2013 17:45:24 +0000 (13:45 -0400)
committerBen Shum <bshum@biblio.org>
Fri, 12 Apr 2013 18:57:31 +0000 (14:57 -0400)
TPAC bucket item retreive fleshes bib records with large blobs of MARC
data.  When a bucket contains a few thousand items, the size of the
data passed around in atomic retreival mode will exceed the typical jabber
max stanza size and result in a failure.  Retrieve the records in
streaming mode instead.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm

index 87b53ec..f98645b 100644 (file)
@@ -1881,7 +1881,8 @@ sub bib_container_items_via_search {
             flesh => 1,
             flesh_fields => {"cbrebi" => \@flesh_fields}
         }
-    ]);
+    ], {substream => 1});
+
     unless ($items) {
         $logger->warn(
             "bib_container_items_via_search() couldn't get bucket items: " .