-
Notifications
You must be signed in to change notification settings - Fork 473
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
Using ReadLockGuard/WriteLockGuard in Context might block user requests #2596
Comments
The DB lock was used to protect the db pointer from being freed while using. All threads currently can guarantee that, so I think we should not use the db lock in Context construction and destruction. cc @PokIsemaine Can refer to the stack:
|
Related PR: #2332 |
Was it permanently blocked, or was it just a long blocking time? I added the two locks because there was data race on the storage during testing. Since it has been quite a while, I have forgotten the exact location. If it's convenient for you, could you try removing them and running the tests with data race checks(TSAN)? |
@PokIsemaine Sure, you can take a look at #2597. |
Search before asking
Version
unstable
Minimal reproduce step
take backup from production (bgsave), rsync to test server, rut it and wait with ugly script:
What did you expect to see?
Compaction won't block user requests
What did you see instead?
User requests are blocked due to waiting for DB lock.
Anything Else?
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: