-
Notifications
You must be signed in to change notification settings - Fork 69
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
IF: fork database transition not thread safe #2083
Comments
Is it really necessary? I would not have thought so because:
|
|
Oh wait, because there is a mutex in fork_db I think we might be fine without the wrapper. What about:
|
That doesn't work without an atomic shared ptr. Boost has an atomic shared ptr we could use for this. Without atomic shared ptr: |
…ant-finality. GH-2083 Moved mutex out of fork database impl so it can protect transition from legacy to instant-finality.
Resolved by #2113 |
Currently
fork_database
is thread safe via internal mutex. During the transition of dpos fork database to instant finality fork database threads from API calls andnet_plugin
can be running. Need to provide a wrapper around the two fork databases that is thread safe and can provide the interfaces needed by API calls,net_plugin
, and controller.Also handle
[greg todo]
leftover from #1941 & #2045 in leap-util blocklog. Thefork_database
wrapper can examine file to determine which internal implementation is in use.The text was updated successfully, but these errors were encountered: