Summary: | ModItemTransfer triggers indexing twice | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi <tomascohen> |
Status: | Needs documenting --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, lucas, martin.renvoize, nick, pedro.amorim, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00
|
|
Bug Depends on: | 31212 | ||
Bug Blocks: | |||
Attachments: |
Bug 33739: Only trigger indexing on last item modification at ModItemTransfer
Bug 33739: Only trigger indexing on last item modification at ModItemTransfer Bug 33739: Only trigger indexing on last item modification at ModItemTransfer |
Description
Tomás Cohen Arazi
2023-05-15 14:52:31 UTC
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. |