Defect HC-18356
Adding support to Cart service to enable sorting by order item's creation date.
Software
Customer case | Applies to | Corrected in |
---|---|---|
CS0291142 | V9.1.6.0 | 9.1.11.0 |
Observed behavior
When operating in a multi-pod environment, the cart service's sortOrderItemBy orderItemId function returns items in a different order than added in some cases.
Expected behavior
The function was intended to return items in the sequence they were added, but does not.
Resolution
Each Commerce JVM pre-fetches a number of key values from the KEYS table. When multiple JVM's are involved, they will each fetch their own set of sequential key values. When session affinity is removed, each JVM could add items to the order, leading to an inconsistent key sequence, correct within the JVM, but incorrect with respect to those of other JVMs.
A new "sortOrderItemBy" value of "createDate" is introduced, enabling the correct sequence to be retrieved.