Marcel de Rooy
07de37f0e5
The original patch creates a lockfile in the ZEBRA_LOCKDIR. It can fall back to /var/lock or even /tmp. If the create fails, it dies. This can be considered as very exceptional. This followup adjusts the fallback location in /var/lock or /tmp slightly. It appends the database name to the folder in order to prevent interfering between multiple Koha instances. Creation of the lockfile has been moved to a subroutine extending directory and file creation testing. In the very unlikely case that we cannot create the lockfile (after three separate tries), this follow-up allows you to continue instead of die. This is just as we did before we had file locking here. Every time skipping a reindex could cause more harm than continuing and having the race condition once in a while. Test plan: Test adding and removing lockdir from your koha-conf.xml. Check fallback. Note that fallback in /var/lock or /tmp must contain database name. Remove the lockdir config line and remove permissions from fallback. In this case the reindex should continue but with a warning. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested with daemon and one-off invocation simultaneously. Tested new wait parameter. Tried all variations of lock directory (changing permissions etc.) Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
||
---|---|---|
.. | ||
admin | ||
bin | ||
cronjobs | ||
devel | ||
interface_customization | ||
load_testing | ||
maintenance | ||
migration_tools | ||
release_notes | ||
translator | ||
batchCompareMARCvsFrameworks.pl | ||
batchdeletebiblios.pl | ||
batchDeleteUnusedSubfields.pl | ||
batchImportMARCWithBiblionumbers.pl | ||
batchRebuildBiblioTables.pl | ||
batchRepairMissingBiblionumbers.pl | ||
batchupdateISBNs.pl | ||
check_sysprefs.pl | ||
commit_file.pl | ||
export_borrowers.pl | ||
exportauth.pl | ||
koha-install-log | ||
kohalib.pl | ||
link_bibs_to_authorities.pl | ||
mod_zebraqueue.pl | ||
perlmodule_ls.pl | ||
perlmodule_rm.pl | ||
recreateIssueStatistics.pl | ||
sax_parser_print.pl | ||
sax_parser_test.pl | ||
stage_file.pl |