-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Vttablet panic in requests Wait #14924
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Manan Gupta <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
vitess-bot
bot
added
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Jan 10, 2024
…locked on waiting for requests Signed-off-by: Manan Gupta <[email protected]>
GuptaManan100
requested review from
harshit-gangal,
systay,
shlomi-noach and
rohit-nayak-ps
as code owners
January 11, 2024 08:17
GuptaManan100
added
Type: Bug
Component: Query Serving
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
Skip CI
Skip CI actions from running
NeedsIssue
A linked issue is missing for this Pull Request
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
labels
Jan 11, 2024
Signed-off-by: Manan Gupta <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14924 +/- ##
==========================================
+ Coverage 47.26% 47.30% +0.04%
==========================================
Files 1136 1137 +1
Lines 238484 238657 +173
==========================================
+ Hits 112721 112907 +186
+ Misses 117158 117138 -20
- Partials 8605 8612 +7 ☔ View full report in Codecov by Sentry. |
systay
approved these changes
Jan 12, 2024
Signed-off-by: Manan Gupta <[email protected]>
harshit-gangal
approved these changes
Jan 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the issue pointed out in #14933.
Reading the docs of
sync.WaitGroup
we see -So, apparently, this panic happens, when we have started waiting for a
waitGroup
and then a bunch ofDone()
calls happen that take the counter to 0, but before theWait()
has been processed, anAdd()
call goes through and that leads to this panic.The only way to properly fix this panic would be to ensure that we don't call
Add()
after we have started waiting for any request. To this end, we have added a new field to the statemanager that tracks the number of go routines that are waiting for the requests to be empty. We use this field to preventAdd()
calls instartRequests
.Related Issue(s)
Checklist
Deployment Notes