From 20940fad40f8a6e9a6bfd92cf2b7f163e83938b6 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 28 Aug 2013 15:05:36 -0400 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c8b290d5ed..0c0d64928c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -1598,7 +1598,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}); -- 2.43.2