November Happy Hour will be moved to Thursday December 5th.

Duplicate LineItemId in cart

Vote:
 

Hi,

We have a Commerce system with heavy load. As far as I know LineItemIds in a cart supposed to be unique for the cart - I also got this confirmed from a Commerce trainer. Our system depends on this.

Extremely rarely occurs a situation in production, when a cart contains LineItems where two of the LineItems have the same LineItemId. In one example which we have there are 11 LineItems, where except two LineItems all others have unique LineItemId.

We have no overrides in functions which is used by cart.CreateLineItem(), including IOrderGroupFactory. The corrupted cart is persisted in SerializableCart, so the problem should happen before creating an order. But exact reproduction steps are unknown for this.

Using Commerce version 11.2.3.

Is there any possible explanation for this or is it a known bug?

Thank you in advance!

#199965
Edited, Dec 19, 2018 21:13
Vote:
 

Hi,

Could you let me know the detailed code that you wrote for creating line item like how to set line item's property and when did you save the cart?

One more thing, did you set up load balancing in your production?

#199968
Edited, Dec 20, 2018 2:06
Vote:
 

Hi,

There's a bug for this, resolved in Commerce 11.2.5

Please check the release note here .

/Viet Anh

#199996
Dec 20, 2018 4:43
Vote:
 

The bug is https://world.episerver.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=COM-5121, as always we recommend to upgrade to latest version available - in this case 12.14. If you can't afford to upgrade to a breaking change release then at least 11.8.5

#199997
Dec 20, 2018 7:05
Vote:
 
Thank you all for the quick response regarding the issue. Indeed, we have a load balanced environment. As for reference the bug is filed at https://world.episerver.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=COM-5121
#200002
Dec 20, 2018 10:14
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.