You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The AuthGuard checks whether the activeChannel on the session for an incoming request matches the channel of the requestcontext.
If this does not match the session, is updated and the customer performing the request is assigned to the active channel, using the function channelService.assignToChannels().
If a caller performs multiple simultaneous calls to new channel, this logic is executed for each of these calls simultaneaously. This calls the function channelService.assignToChannels() multiple times simultaneously with the same data. The first call succeeds, but the other calls result in an SQL error: ER_DUP_ENTRY: Duplicate entry '6-2' for key 'customer_channels_channel.PRIMARY'
To Reproduce
Steps to reproduce the behavior:
Create a customer
Perform multiple queries to the shop-api simultaneously with a vendure-token header of a channel the customer is not yet assigned to
The text was updated successfully, but these errors were encountered:
Describe the bug
The AuthGuard checks whether the activeChannel on the session for an incoming request matches the channel of the requestcontext.
If this does not match the session, is updated and the customer performing the request is assigned to the active channel, using the function
channelService.assignToChannels()
.If a caller performs multiple simultaneous calls to new channel, this logic is executed for each of these calls simultaneaously. This calls the function
channelService.assignToChannels()
multiple times simultaneously with the same data. The first call succeeds, but the other calls result in an SQL error:ER_DUP_ENTRY: Duplicate entry '6-2' for key 'customer_channels_channel.PRIMARY'
To Reproduce
Steps to reproduce the behavior:
vendure-token
header of a channel the customer is not yet assigned toThe text was updated successfully, but these errors were encountered: