Summary: | Race condition while checkout renewal with ES | ||
---|---|---|---|
Product: | Koha | Reporter: | Janusz Kaczmarek <januszop> |
Component: | Architecture, internals, and plumbing | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P3 | CC: | arthur.suzuki, jonathan.druart, lucas, matt.blenkinsop, nick |
Version: | Main | Keywords: | rel_22_11_candidate |
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33287 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33019 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00,22.11.05,22.05.12,21.11.20
|
|
Circulation function: | |||
Attachments: |
Bug 33309: Index items after renewal transaction completes
Bug 33309: Index items after renewal transaction completes Bug 33309: Index items after renewal transaction completes |
Description
Janusz Kaczmarek
2023-03-22 16:10:04 UTC
Created attachment 148569 [details] [review] Bug 33309: Index items after renewal transaction completes This patch ensures a record is indexed only after the renewal transaction has completed successfully. Otherwise the job cannot be found by the background process worker, becaue it was not yet in the DB To test: 1 - Make sure you are using ES, and the es indexer is running 2 - tail -f /var/log/koha/kohadev/*.log 3 - Issue an item to a patron and renew it 4 - Note error in es-indexer-output.log like: [2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129) 5 - Apply patch 6 - Renew again 7 There should be no error 8 - Search for the record and confirm items info displays correctly 9 - View the background jobs in admin, confirm the most recent job has completed The only comment I would have for the testers -- since it is a race condition, not for every renewal would happen the issue signalized by "No job found for id=nnn"; sometimes everything would proceed smoothly. Created attachment 148573 [details] [review] Bug 33309: Index items after renewal transaction completes This patch ensures a record is indexed only after the renewal transaction has completed successfully. Otherwise the job cannot be found by the background process worker, becaue it was not yet in the DB To test: 1 - Make sure you are using ES, and the es indexer is running 2 - tail -f /var/log/koha/kohadev/*.log 3 - Issue an item to a patron and renew it 4 - Note error in es-indexer-output.log like: [2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129) 5 - Apply patch 6 - Renew again 7 There should be no error 8 - Search for the record and confirm items info displays correctly 9 - View the background jobs in admin, confirm the most recent job has completed Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> Created attachment 148605 [details] [review] Bug 33309: Index items after renewal transaction completes This patch ensures a record is indexed only after the renewal transaction has completed successfully. Otherwise the job cannot be found by the background process worker, becaue it was not yet in the DB To test: 1 - Make sure you are using ES, and the es indexer is running 2 - tail -f /var/log/koha/kohadev/*.log 3 - Issue an item to a patron and renew it 4 - Note error in es-indexer-output.log like: [2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129) 5 - Apply patch 6 - Renew again 7 There should be no error 8 - Search for the record and confirm items info displays correctly 9 - View the background jobs in admin, confirm the most recent job has completed Signed-off-by: Janusz Kaczmarek <januszop@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 23.05. Nice work everyone, thanks! Nice work everyone! Pushed to stable for 22.11.x Backported to 22.05.x for upcoming 22.05.12 applied to 21.11.x for 21.11.20 |