[Koha-bugs] [Bug 5724] Sometimes deletes aren't processed correctly by rebuild zebra

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 8 10:49:06 CEST 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5724

--- Comment #26 from M. de Rooy <m.de.rooy at rijksmuseum.nl> 2011-09-08 08:49:06 UTC ---
(In reply to comment #25)
> There is a problem when you edit a biblio just before deleting it.
> When exporting biblios, koha will export and do the deletion first.
> Then it will recreate the biblio with the upd exported iso2907.
> Just stop your cronjob,
> edit a record, then delete it.
> Then try to do rebuild_zebra.pl -b -z 
> And search the title (hoping that you have the list and not geting directly to
> the record... in case of which you are directed to 404)
> The record is not deleted from zebra...
> This patch was meant for that problem.
> I think that simply changing delete/update order would be enough.
> But it is an old patch, and was written before bug 5959.

Test results:

mysql> select * from zebraqueue where done=0;
+--------+--------------------+---------------+--------------+------+---------------------+
| id     | biblio_auth_number | operation     | server       | done | time     
          |
+--------+--------------------+---------------+--------------+------+---------------------+
| 123457 |             120900 | specialUpdate | biblioserver |    0 |
2011-09-08 10:26:23 |
| 123458 |             120900 | recordDelete  | biblioserver |    0 |
2011-09-08 10:26:39 |
+--------+--------------------+---------------+--------------+------+---------------------+
2 rows in set (0.32 sec)

====================
exporting biblio
====================
^M1.
Records exported: 1

10:28:18-08/09 zebraidx(30076) [log] dir /tmp/jcwrMc7Wq3/del_biblio
10:28:18-08/09 zebraidx(30076) [log] delete grs.marcxml.record
/tmp/jcwrMc7Wq3/del_biblio/exported_records 0
10:28:20-08/09 zebraidx(30076) [log] Iterations: isam/dict 1269/458
10:28:20-08/09 zebraidx(30076) [log] Dict: inserts/updates/deletions: 1/384/73
10:28:20-08/09 zebraidx(30076) [log] Records: 1 i/u/d 0/0/1


So, the steps do not reproduce the problem on current master. The record is
correctly deleted from zebra! Please note that I already explained why in
comment 24. Changing order is not relevant. Probably, this could have worked in
an older version of the script, but it is not actual anymore.

By the way: There is a (very) small timeframe between selecting records for
update/delete and marking them as done in the zebraqueue table. If a record
gets updated or deleted just in between, that zebraqueue record is not selected
but it does get marked as done. This would result in not updating zebra or
incorrectly keeping that record in zebra.
You could resolve it by e.g. changing the done column temporarily to a unique
number indicating selection. And only updating these selected records to 1
later on. (Or do something with locking.) 
But it is a rather fictive situation.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list