-
Notifications
You must be signed in to change notification settings - Fork 132
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
enforce the correct order of writes to storage #1441
Conversation
Removing the global lock from the storage allowed for better performance. However, there is an issue of writes possibly done out of the expected order due to the underlying pool of parallel sqlite connections or put_block/tag tasks being run in parallel tokio executors. Now we introduce the global write lock for the block storage while still allowing parallel reads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. a little comment in the Storage
structure would be welcome.
Especially it would be useful to explain why there is a Lock of the same object and how it is meant to be used.
@NicolasDP Added a comment and renamed the fields of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mzabaluev , This might be linked to some of the state management issue we saw the last past week in the candidate tree. |
Removing the global lock from the storage allowed for better
performance. However, there is an issue of writes possibly done
out of the expected order due to the underlying pool of parallel sqlite
connections or put_block/tag tasks being run in parallel tokio
executors. Now we introduce the global write lock for the block storage
while still allowing parallel reads.
Should fix #1422 (p. 3) #1438