Koha/misc/bin
Doug Kingston 88e7faf860 Bug 11078: Add locking to rebuild_zebra
This patch adds locking to rebuild_zebra.pl to ensure that simultaneous
changes are prevented (as one is likely to overwrite the other).
Incremental updates in daemon mode will skipped if the lock is busy
and they will be picked up on the next pass.  Non-daemon mode
invocations will also exit immediately if they cannot get the lock
unless the new flag -wait-for-lock is specified, in which case they
will wait until the get the lock and then proceed.

Supporting changes made to Makefile.PL and templates for the new
locking directory (paralleling the other zebra lock directories).
We stash the zebra_lockdir in koha-conf.xml so rebuild_zebra.pl
can find it.

To address earlier QA concerns we:
1. added code to check if flock is available and ignore locking if
it's missing (from M. de Rooy)

2. changed default for adhoc invocations to abort if they cannot
obtain the lock.  Added option -wait-for-lock if the user prefers
to wait until the lock is free, and then continue processing.

3. added missing entry to t/db_dependent/zebra_config.pl

4. added a fallback locking directory of /tmp

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Doug merged the original patch with the QA changes.
Just for the record, noting here that the original patch was tested
extensively too by Martin Renvoize.
I have added a followup for some exceptional cases.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-28 22:21:41 +00:00
..
connexion_import_daemon.pl Bug 7613: OCLC Connexion web service and desktop client, followup patch 2012-09-05 14:53:13 +02:00
koha-index-daemon-ctl.sh Bug 8519 - Make koha-index-daemon run on startup 2012-12-07 09:19:18 -05:00
koha-pazpar2-ctl.sh Added LSB information and copyright headers to two scripts in misc/bin. Thanks to Mahesh T Pai <paivakil@gmail.com> for the mailing list post Message-ID: <87y60x10de.fsf@gmail.com> containing them. 2011-06-26 02:39:08 +12:00
koha-zebra-ctl.sh Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
set-selinux-labels.sh 7675 New script for changing selinux file labels on perl scripts 2012-09-14 17:17:04 +02:00
sip_run.sh Bug 8271 teach SIPServer.pm to set its own lib path 2012-07-06 18:28:11 +02:00
sip_shutdown.sh Bug 7238 : Shifting SIPconfig.xml to the etc dir and the scripts to misc/bin 2012-02-03 15:15:22 +01:00