-
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
Prevent adding to query details after unserve common has started #15684
Merged
GuptaManan100
merged 5 commits into
vitessio:main
from
planetscale:prevent-addition-to-query-detail
Apr 11, 2024
Merged
Prevent adding to query details after unserve common has started #15684
GuptaManan100
merged 5 commits into
vitessio:main
from
planetscale:prevent-addition-to-query-detail
Apr 11, 2024
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
Apr 9, 2024
GuptaManan100
added
Type: Bug
Component: Cluster management
Component: Query Serving
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
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
Apr 9, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15684 +/- ##
==========================================
+ Coverage 68.13% 68.40% +0.26%
==========================================
Files 1556 1556
Lines 195028 195136 +108
==========================================
+ Hits 132888 133476 +588
+ Misses 62140 61660 -480 ☔ View full report in Codecov by Sentry. |
GuptaManan100
requested review from
harshit-gangal,
systay,
shlomi-noach and
rohit-nayak-ps
as code owners
April 9, 2024 10:46
… not deterministic anymore Signed-off-by: Manan Gupta <[email protected]>
dbussink
approved these changes
Apr 9, 2024
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
harshit-gangal
approved these changes
Apr 11, 2024
…fter the defer function has run Signed-off-by: Manan Gupta <[email protected]>
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 bug found in #15685. The problem was that we were adding to the queryDetails even after unserveCommon had been called and after the kill had happened. This is troublesome and has been fixed by preventing addition to the query details right after
unserveCommon
starts.The fix entails adding a new state in the QueryList which stores the state of a cluster-wide action. The three values for the new state are -
ClusterActionNotInProgress
- This is the default state of a query list and the state that it starts in. This state signifies that no ClusterAction is in progress.ClusterActionInProgress
- This state signifies a cluster action is ongoing, but the query list is still free to accept any new queries.ClusterActionNoQueries
- This state signifies that a cluster action is ongoing and the query list should reject all new incoming queries.The transitions between the 3 states are as follows -
The interesting thing to note here is that if we are in the
ClusterActionNotInProgress
state, then we ignore a transition toClusterActionNoQueries
. This is needed because sometimes the grace period might expire after the execution of unserveCommon has finished due to the fast path of not having any outstanding requests. In this case, we don't want the query list to stop accepting requests since no cluster action is in progress.Related Issue(s)
Checklist
Deployment Notes