http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11078
Doug Kingston <d...@randomnotes.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22205|0 |1 is obsolete| | --- Comment #8 from Doug Kingston <d...@randomnotes.org> --- Created attachment 22458 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22458&action=edit Bug 11078 Add locking to rebuild_zebra to prevent race conditions (revised 10/27) (revised to address a QA issue on lock directory location) The race condition exists whether you are doing incremental updates with a periodic cronjob or with the new daemon mode. Suppose you start a full rebuild at time T0 which will take until T20 to extract the records. Suppose also at T10, a biblio or auth is updated and processed through the zebraqueue by T15. In this situation the updated record in zebra will be overwritten when the full rebuild records are uploaded to zebra after T20. We prevent this by only allowing one rebuild_zebra per koha instance to be running at one time. This patch adds flock based locking for rebuild_zebra.pl on a per-instance basis. This prevents races between full rebuilds and background incremental updates from the zebraqueue table in the database. Add a lockdir to the config file to allow the proper location to be determined at runtime. When running in daemon mode (see bug 6435), incremental updates will be skipped while a full rebuild is running, and resume afterwards. A full rebuild or other adhoc request will wait for any previous lock to clear. Tested by flocking the lock file while invoking rebuild_zebra.pl in various modes (daemon, adhoc zebraqueue task, and full rebuild) using flock program I will attach to bug. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/