Information on how optimistic locking works in the B2C Commerce platform.
The use of Optimistic Locking is a design decision made by B2C Commerce which aims to account for business logic that updates objects. The goal is that since objects can be concurrently updated by different threads / processes, the platform should be designed to cope with that. Therefore, an OptimisticLockingException error is not an error condition in the strictest sense, but rather an expected behavior for object updates since there can be multiple threads updating an object at any given time. It's reasonable to assume that you will encounter situations where an object you are working with has been updated during the time that you are updating it.
Some suggestions we can provide to account for this are below:
000391455

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.