Try our conversational search powered by Generative AI!
AI OnAI Off
Mar 30, 2016
May 11, 2016
Core
Closed, Fixed and tested
When a cart gets created by calling Cart.GetCart (overload with string name, Guid customerId, MarketId marketId), a race condition occurs which can cause an exception.
If a second thread reads the cart list from cache before the first thread creates and caches a cart, the second thread tries to create another cart. This leads either to an exception (because of a DB constraint) or the creation of multiple carts, which leads to an exception the next time the cart is loaded (because the code assumes only one cart can exist (SingleOrDefault)).