Troubleshooting
Problem
Attempts to run reserveAvailableInventory locks records in YFS_INVENTORY_ITEM and impacts performance in IBM Sterling Order Management.
Cause
This is working as designed.
Diagnosing The Problem
The API does not modify corresponding entry in YFS_INVENTORY_ITEM. But it fires the following query -SELECT YFS_INVENTORY_ITEM.* FROM YFS_INVENTORY_ITEM YFS_INVENTORY_ITEM WHERE INVENTORY_ITEM_KEY = ? FOR UPDATE.
When reserveAvailableInventory is run, there is an update or insert made in the yfs_inventory_demand table. In order to ensure that entry in the demand table is not simultaneously
updated by another process, a lock is put on the corresponding inventory_item_key in the YFS_INVENTORY_ITEM table. An update on the demand table will follow this lock. Before any updates
are made to the supply or demand tables, the inventory item key is locked to prevent updates for other threads/processes. You will notice a similar behavior for other APIs that affect the supply or demand of the inventory like createOrder,scheduleOrder etc.
Resolving The Problem
To avoid these for update locks by reserveAvailableInventory and the other APIs that change the demand picture, Hot SKU feature can be implemented to avoid locking during supply/demand updates.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21976116