-
Notifications
You must be signed in to change notification settings - Fork 157
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
WriteBatch
is not thread safe
#154
Comments
I think the user will rarely use a WriteBatch cross multi-threads, maybe make it with no send, no sync? |
It may be a workaround, but certainly not a good design and feels weird. |
I think it's pretty common to have multiple writes distributed across threads, that should include |
That's exact the reason why
No. Generally, |
From what I can see,
WriteBatch
is not thread safe. We should change theput
method to take a mut ref instead.https://github.com/facebook/rocksdb/blob/e03377c7fd86f117c6c64d35955140dab400eb3c/db/write_batch.cc#L525-L547
The text was updated successfully, but these errors were encountered: