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
During some tests with a custom module, i encountered an issue with the use of ModuleContext.
In the BidderRequest hook, when I attempt to replace data from the ModuleContext, i encounter a concurrency issue:
fatal error: concurrent map read and map write
This issue makes sense because I retrieve data stored under a key in the map and then try to update it after performing some operations. Since BidderRequest is triggered for every bidder and the ModuleContext is shared across all hooks of the module, this concurrency problem arises.
I guess that will happen to the RawBidderResponse as well.
Theoretically, it is possible to replace ModuleContext with a sync.Map, but this would introduce some performance issues.
Is this behavior intentional ?
The text was updated successfully, but these errors were encountered:
During some tests with a custom module, i encountered an issue with the use of ModuleContext.
In the BidderRequest hook, when I attempt to replace data from the ModuleContext, i encounter a concurrency issue:
This issue makes sense because I retrieve data stored under a key in the map and then try to update it after performing some operations. Since BidderRequest is triggered for every bidder and the ModuleContext is shared across all hooks of the module, this concurrency problem arises.
I guess that will happen to the RawBidderResponse as well.
Theoretically, it is possible to replace ModuleContext with a sync.Map, but this would introduce some performance issues.
Is this behavior intentional ?
The text was updated successfully, but these errors were encountered: