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
In our application we are registering a custom dialect for Snowflake and returning the newly registered dialect for all the queries. Recently we added a snippet that would launch multiple goroutines utilising the custom registered dialect. However, this caused a concurrent map read and map write error. On debugging this I realised that the RegisterDialect doesn't have any kind of mechanism to handle concurrent read or writes.
I understand the example provided isn't full blown example but should help understand the underlying problem I am talking about. I did solve this problem in my case by wrapping the the RegisterDialect under a sync.Once for myself.
I also want to highlight just the minimum example isn't enough to reproduce the scenario. And I cannot share my code snippet without exposing the IP.
The text was updated successfully, but these errors were encountered:
Describe the bug
In our application we are registering a custom dialect for Snowflake and returning the newly registered dialect for all the queries. Recently we added a snippet that would launch multiple goroutines utilising the custom registered dialect. However, this caused a
concurrent map read and map write
error. On debugging this I realised that theRegisterDialect
doesn't have any kind of mechanism to handle concurrent read or writes.To Reproduce
I understand the example provided isn't full blown example but should help understand the underlying problem I am talking about. I did solve this problem in my case by wrapping the the RegisterDialect under a
sync.Once
for myself.I also want to highlight just the minimum example isn't enough to reproduce the scenario. And I cannot share my code snippet without exposing the IP.
The text was updated successfully, but these errors were encountered: