Bugzilla – Attachment 22985 Details for
Bug 11078
rebuild_zebra.pl can lose updates due to race condition during full rebuilds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Address coding style issues from koha-qa.pl
0006-Bug-11078-Add-locking-to-rebuild_zebra-QA-Patch-4.patch (text/plain), 1.77 KB, created by
Doug Kingston
on 2013-11-17 20:09:27 UTC
(
hide
)
Description:
Address coding style issues from koha-qa.pl
Filename:
MIME Type:
Creator:
Doug Kingston
Created:
2013-11-17 20:09:27 UTC
Size:
1.77 KB
patch
obsolete
>From 33f19fe10c42198ccd64d23fcae0095a52f3def7 Mon Sep 17 00:00:00 2001 >From: Doug Kingston <dpk@randomnotes.org> >Date: Sun, 17 Nov 2013 11:30:15 -0800 >Subject: [PATCH 6/6] Bug 11078 Add locking to rebuild_zebra QA Patch 4 > >Address coding style issues from koha-qa.pl >--- > misc/migration_tools/rebuild_zebra.pl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl >index 8b77686..74976c1 100755 >--- a/misc/migration_tools/rebuild_zebra.pl >+++ b/misc/migration_tools/rebuild_zebra.pl >@@ -146,7 +146,7 @@ my ($biblioitemnumbertagfield,$biblioitemnumbertagsubfield) = &GetMarcFromKohaFi > my $lockdir = C4::Context->config("lockdir"); > $lockdir = "/var/lock" if $lockdir == ""; > $lockdir .= ("/koha_rebuild_zebra_" . C4::Context->config("database")); >-mkpath($lockdir, 0, 0755) unless (-d $lockdir); >+mkpath($lockdir, 0, oct(755)) unless (-d $lockdir); > my $lockfile = $lockdir . "/lock"; > > if ( $verbose_logging ) { >@@ -173,14 +173,14 @@ my $tester = XML::LibXML->new(); > # record being overwritten by a rebuild if the update is applied after the export > # by the rebuild and before the rebuild finishes (more likely to effect large > # catalogs). >-open(LockFH, ">$lockfile") or die "$lockfile: $!"; >+open my $LockFH, q{>}, $lockfile or die "$lockfile: $!"; > if ($daemon_mode) { > while (1) { > # For incremental updates, skip the update if the updates are locked >- if (flock(LockFH, LOCK_EX|LOCK_NB)) { >- do_one_pass() if ( zebraqueue_not_empty() ); >- flock(LockFH, LOCK_UN); >- } >+ if (flock(LockFH, LOCK_EX|LOCK_NB)) { >+ do_one_pass() if ( zebraqueue_not_empty() ); >+ flock(LockFH, LOCK_UN); >+ } > sleep $daemon_sleep; > } > } else { >-- >1.7.9.5 >
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 11078
:
22044
|
22045
|
22205
|
22458
|
22506
|
22508
|
22532
|
22985
|
22992
|
23220
|
23221
|
23573
|
23574
|
25114
|
25172
|
25330
|
25412
|
25446
|
25447