With the changes from bug 31212, it is happening again, because the implicit call to `ModDateLastSeen` is not passed the skip_record_index flag.
Marking as blocker to get some attention.
Created attachment 151198 [details] [review] Bug 33739: Only trigger indexing on last item modification at ModItemTransfer This patch makes ModItemTransfer trigger record indexing only on the last call (in $transfer->transit). And extra parameter is added to ->transit to effectively honour the ModItemTransfer parameter. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Indexer.t => FAIL: Indexing is requested twice, should only be once 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! Indexing is requested only once! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I wanted to mention that bug 31212 highlighted an existing issue, not catched by the current tests before its inclussion, because of the DT truncation taking place.
Created attachment 151219 [details] [review] Bug 33739: Only trigger indexing on last item modification at ModItemTransfer This patch makes ModItemTransfer trigger record indexing only on the last call (in $transfer->transit). And extra parameter is added to ->transit to effectively honour the ModItemTransfer parameter. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Indexer.t => FAIL: Indexing is requested twice, should only be once 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! Indexing is requested only once! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 151244 [details] [review] Bug 33739: Only trigger indexing on last item modification at ModItemTransfer This patch makes ModItemTransfer trigger record indexing only on the last call (in $transfer->transit). And extra parameter is added to ->transit to effectively honour the ModItemTransfer parameter. I wanted to mention that bug 31212 highlighted an existing issue, not catched by the current tests before its inclussion, because of the DT truncation taking place. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Indexer.t => FAIL: Indexing is requested twice, should only be once 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! Indexing is requested only once! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I am wondering if we should not switch from "always index unless asked for" to "index on-demand only". This is getting messy.
(In reply to Jonathan Druart from comment #6) > I am wondering if we should not switch from "always index unless asked for" > to "index on-demand only". This is getting messy. Agreed...
Pushed to master for 23.05.
Missing dependencies on 22.11.x, not pushing.
No changes required for the manual.