-
Notifications
You must be signed in to change notification settings - Fork 590
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
fix(storage): lock table may cause deadlock and block iter #13979
Conversation
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #13979 +/- ##
==========================================
- Coverage 68.06% 68.04% -0.03%
==========================================
Files 1535 1536 +1
Lines 265039 265364 +325
==========================================
+ Hits 180407 180568 +161
- Misses 84632 84796 +164
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Little-Wallace <[email protected]>
Can you explain how the deadlock happens in the PR description? |
I do not understand, but the trace stack show that it hung on lock-table. |
Is there a await tree dump? |
Related issue #13932 |
Just have tested a backfill on a table with only 1 parallelism and it succeeds, so it is a deadlock between different parallelism. |
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.
We should hold the LockGuard before calling the notified
, otherwise, no one would drop the guard when the future is dropped in that await point.
let lock = LockGuard {
key,
locks: self.locks.clone(),
};
if let Some(notify) = notify {
notify.notified().await;
}
return lock
https://risingwave-labs.slack.com/archives/C069B78AXDW/p1702439327854279 |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Fix #13943
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.