Bugzilla – Attachment 64915 Details for
Bug 18909
Enable the maximum zebra records size to be specified per instance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18909 - Enable the maximum zebra records size to be specified per instance
Bug-18909---Enable-the-maximum-zebra-records-size-.patch (text/plain), 2.17 KB, created by
Kyle M Hall (khall)
on 2017-07-07 13:52:45 UTC
(
hide
)
Description:
Bug 18909 - Enable the maximum zebra records size to be specified per instance
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-07-07 13:52:45 UTC
Size:
2.17 KB
patch
obsolete
>From f75527277af7a34ad7f2730a61f823ce25683ce4 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 30 Jun 2017 00:02:15 -0400 >Subject: [PATCH] Bug 18909 - Enable the maximum zebra records size to be > specified per instance > >The default for Zebra is to not return results where the record size is >greater than 1045 KB ( 1 MB ). Some libraries need to increase this >ceiling, but it may come at a cost with z39.50 compatibility with other >services. For that reason, we should make this setting configurable on a >per-instance basis. > >Test Plan: >1) Apply this patch >2) Build a Debian package >3) Specify a zebra_max_record_size of 2048 in your koha_conf.xml >4) Index a record greater than 1 MB but smaller than 2 MB >5) Note that it is searchable! >--- > debian/scripts/koha-functions.sh | 12 ++++++++++++ > debian/scripts/koha-start-zebra | 2 ++ > 2 files changed, 14 insertions(+) > >diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh >index fc1a329..2b9d965 100755 >--- a/debian/scripts/koha-functions.sh >+++ b/debian/scripts/koha-functions.sh >@@ -234,6 +234,18 @@ get_loglevels() > > } > >+get_max_record_size() >+{ >+ local instancename=$1 >+ local retval=$(xmlstarlet sel -t -v 'yazgfs/config/zebra_max_record_size' /etc/koha/sites/$instancename/koha-conf.xml) >+ if [ "$retval" != "" ]; then >+ echo "$retval" >+ else >+ echo "1024" >+ fi >+ >+} >+ > get_tmpdir() > { > if [ "$TMPDIR" != "" ]; then >diff --git a/debian/scripts/koha-start-zebra b/debian/scripts/koha-start-zebra >index 513547e..74de26b 100755 >--- a/debian/scripts/koha-start-zebra >+++ b/debian/scripts/koha-start-zebra >@@ -32,6 +32,7 @@ start_zebra_instance() > > # get zebra log levels from koha-conf.xml > local loglevels=$(get_loglevels $instancename) >+ local max_record_size=$(get_max_record_size $instancename) > > echo "Starting Zebra server for $instancename" > touch "/var/log/koha/$instancename/zebra-error.log" \ >@@ -51,6 +52,7 @@ start_zebra_instance() > -- \ > zebrasrv \ > -v $loglevels \ >+ -k $max_record_size \ > -f "/etc/koha/sites/$instancename/koha-conf.xml" && \ > return 0 || \ > return 1 >-- >2.10.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18909
:
64915
|
72493
|
84284
|
84348