Details
-
Bug
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
25.0.0, 25.0.1
-
None
-
CP: Sprint 152, CP: Sprint 154
-
1
-
Core: Platform
-
Nolana (R3 2022) Bug Fix
-
Implementation coding issue
Description
Data corruption in mod-search/Elasticsearch/OpenSearch because the item is correctly updated in mod-inventory-storage but not in mod-search/Elasticsearch/OpenSearch.
About 20% of all builds in GitHub Action fail with this error:
ItemStorageTest.canMoveItemToNewInstance:410 ยป ConditionTimeout Condition with...
The log of the failure has this exception during the canMoveItemToNewInstance test:
18:28:27 [] [test_tenant] [] [mod_inventory_storage] ERROR ? Unhandled exception
java.lang.NullPointerException: null
at org.folio.services.domainevent.ItemDomainEventPublisher.publishUpdated(ItemDomainEventPublisher.java:38) ~[classes/:?]
at org.folio.services.item.ItemService.lambda$14(ItemService.java:141) ~[classes/:?]
NPE is caused by oldHoldings being null as there is no async coordination in the code – publishUpdated may execute (and actually executes in 20% of all runs) before the old holding has been fetched; oldHoldings is a parameter passed into publishUpdated.
As a result the Kafka item event message with the item change is not generated and mod-search/Elasticsearch/OpenSearch is NOT updated and has still the old item record.
The percentage (20%) of affected item moves may vary because it is a timing/race condition issue that likely depends on the deployment environment (hardware) and how other parallel processes use mod-inventory-storage and the database.
After introducing async coordination this build failure no longer happens and the Kafka item event message is always sent.
TestRail: Results
Attachments
Issue Links
- blocks
-
MODINVSTOR-996 RMB 35.0.4, Vert.x Vert.x 4.3.5, Jackson 2.14.0
-
- Closed
-
- relates to
-
MODORDERS-642 Data corruption. When holding/item data are moved in Inventory, then the connected Order lines are not updated accordingly
-
- In Refinement
-
-
UICR-125 Data corruption. When holding/item data are moved in Inventory, then the item in Courses is not updated accordingly
-
- Open
-
-
UIREQ-589 [BE] Data corruption. When holding/item data are moved in Inventory, then the connected Request is not updated accordingly
-
- Open
-
-
UIU-2082 [BE] Data corruption. When holdings/item data are moved in Inventory, then the connected Fee/Fine is not updated accordingly
-
- Closed
-