-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a new instance of the Engine not thread safe. #43
Comments
Will take a look on Tuesday |
But I didn't get the the problem actually, DBreeze instance is definitely thread safe. First instance must be initiated and only after that it must be consumed - that should be obviously, that's why, intentionally, dictionaries in the constructor of the instance are lockless. |
If you have 5 databases running in the same application and you need to create 5 engine instances where the creation is from 5 different threads you may get concurrncy errors due to shared static dictionary. Thats fine if its intentional, but the instance creation is not thread safe. We fixed it our side by protecting the initialization. |
v 1.089 |
A static dictionary is initiated without locks.
Not sure if this is intentional.
See comments in our code: https://github.com/stratisproject/StratisBitcoinFullNode/blob/master/Stratis.Bitcoin/Utilities/DBreezeSingleThreadSession.cs#L85
The text was updated successfully, but these errors were encountered: