From: Mike Rylander Date: Wed, 28 Aug 2013 19:05:36 +0000 (-0400) Subject: Stream facet data X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ca021fac379e8141f18faa3ec22c28899c268df7;p=evergreen%2Fpines.git Stream facet data For certain shapes of facet datasets, the .atomic version of the json_query call can produce an XMPP message large enough to cause ejabberd to fall over unceremoniously. Switch to a streaming CStoreEditor-based call instead to avoid this. Ideally, this would use message bundling (aka, chunking) as well, but the C parts of OpenSRF don't seem to support that yet. Signed-off-by: Mike Rylander Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 1b6a9cedf2..7c744cca2e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -1595,7 +1595,7 @@ sub cache_facets { $query->{where}->{'+cmf'}->{field_class} = {'not in' => $ignore} if ref($ignore) and @$ignore > 0; - my $facets = $U->cstorereq("open-ils.cstore.json_query.atomic", $query); + my $facets = OpenILS::Utils::CStoreEditor->new->json_query($query, {substream => 1}); for my $facet (@$facets) { next unless ($facet->{value});