Enable inventory locking on low availability
The hot SKU feature control parameters can be tuned to enable locking on inventory item optimistically. The inventory item is locked when availability is low. Furthermore, inventory is locked only when availability is low for item-node and for nodes under consideration in the current fulfillment request.
Optimistic lock avoidance
The Optimistic Lock Avoidance (OLA) feature facilitates an active and optimistic locking for an item during scheduling and reservation processes.
The yfs.hotsku.lockOnlyOnLowAvailability property determines whether inventory
lock must be avoided until availability gets low in the distribution group that is configured for
fulfillment. With Optimistic Lock Avoidance feature, when the application checks availability for
the first time, it assumes that all items have high availability and avoids locking. The
availability calculation does not lock the YFS_INVENTORY_ITEM
record unless a
corresponding record exists in the INV_INVENTORY_ITEM_LOCK
table for the demand
type. Even when a record is created in INV_INVENTORY_ITEM_LOCK
table, inventory
lock is driven by the PURPOSE
value, which is based on the availability status.
INV_INVENTORY_ITEM_LOCK
table.
Purpose | Determination | Value |
---|---|---|
10 | Item-DemandType | Low Availability |
11 | Item-DemandType | No Availability |
Optimistic lock avoidance with granular locking
In addition to locking improvements with Optimistic Lock Avoidance (OLA), the granular locking feature enables locking of item for availability checks only when the availability for an item is low at a node.
If you set the value of the yfs.hotsku.useGranularLockingForItem property to
Y, the property determines whether granular locking is enabled with OLA. If
enabled, the application assumes that the availability for an item at a node is high. Based on the
hot SKU control parameters, if the availability is low, a record is inserted in the
INV_INVENTORY_ITEM_LOCK
table with PURPOSE values based on the
availability status.
Purpose | Determination | Value |
---|---|---|
20 | Item-Node-DemandType | Low Availability or 0 Availability |
Item-Node-DemandType
determination, when PURPOSE is
set to 20, the lock switches from YFS_INVENTORY_ITEM
to
INV_INVENTORY_ITEM_LOCK
.
Purpose | Determination | Value |
---|---|---|
21 | Item-Node-DemandType | No Availability |
It is recommended that you use the yfs.hotsku.assumeUnavailableOnLockTimeout property, which determines whether an item must be assumed as not available, if the lock cannot be acquired. The yfs.hotsku.assumeUnavailableOnLockTimeout property is applicable only when the yfs.hotsku.useTimeOutLocking property is set to Y. If the yfs.hotsku.useTimeOutLocking property is set to Y, and if a timeout occurs, it is assumed that there is no inventory available for this item. It is assumed that inventory is not available for the sourcing rule details. If multiple sourcing rule details are present, the normal expansion continues and lock is again attempted.
The benefit is that it improves the performance of the APIs.
With the new feature enabled, the availability calculation does not apply lock unless a
corresponding record exists in the INV_INVENTORY_ITEM_LOCK
table for the demand
type.
Avoid supply or demand updates from locking the YFS_INVENTORY_ITEM record
To avoid the contention during supply or demand updates, the yfs.hotsku.lockItemOnInventoryChanges property is introduced. By default, the value of this property is set to Y. If this property is set to Y, the inventory item is locked even before making supply or demand updates.
When the yfs.hotsku.lockItemOnInventoryChanges property is set to
N, inventory lock is avoided during adjustments. The contention is reduced as
the lock contention moves from the item-level to the item-supply or the item-demand level. The
overall response time is improved for supply or demand updates as an extra lookup in
YFS_INVENTORY_SUPPLY_ADDNL
and YFS_INVENTORY_DEMAND_ADDNL
is no
longer needed. In addition to the reduced lookups, item locking can be avoided. As the lock on
YFS_INVENTORY_ITEM
no longer occurs, an intrinsic lock is applied at the row level
for each supply or demand record.
YFS_INVENTORY_SUPPLY_ADDNL
or YFS_INVENTORY_DEMAND_ADDNL
table.