Node capacity locking

You can enable node capacity locking by enabling the property yfs.nodecapacity.lock to true.

Working of node capacity locking

Capacity check against threshold
Every time the system checks capacity, it compares the available capacity with the threshold defined in yfs.nodecapacity.threshold.
  • Threshold is expressed as a percentage. For example, 20 means 20%.
  • If capacity is above the threshold, no locking is applied for the resource pool and date.
  • If capacity is below the threshold, locking is required before any future availability checks. This ensures all threads know that a lock is needed for that resource pool and date.
Locking Behavior
When locking is required, subsequent availability checks wait for the lock for the time specified in yfs.nodecapacity.timeout.
The value is in seconds.
The default value is 0 seconds that means no wait.
Note: If the timeout expires, the system assumes no capacity is available and falls back to the standard sourcing and inventory logic.
Retry Attempts
You can configure how many times the system retries to acquire the lock using nodecapacity.maxLockRetry. For example, nodecapacity.maxLockRetry = 2.
The default value is 1.
Note: After the maximum retries, the system assumes capacity is unavailable for the resource pool and date.

Summary of key properties

Table 1. Key properties in node locking capacity
Property name Description Default value
yfs.nodecapacity.lock Enables node capacity locking. false
yfs.nodecapacity.threshold Capacity threshold in percentage. For example 20 for 20%. 0
yfs.nodecapacity.timeout Lock wait time in seconds. 0 that means no wait.
nodecapacity.maxLockRetry Maximum retry attempts for lock acquisition. 1