-
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
VTGate MoveTables Buffering: Fix panic when buffering is disabled #16922
VTGate MoveTables Buffering: Fix panic when buffering is disabled #16922
Conversation
Signed-off-by: Rohit Nayak <[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
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16922 +/- ##
==========================================
- Coverage 69.43% 69.42% -0.02%
==========================================
Files 1570 1570
Lines 203812 203923 +111
==========================================
+ Hits 141517 141571 +54
- Misses 62295 62352 +57 ☔ View full report in Codecov by Sentry. |
go/vt/vtgate/plan_execute.go
Outdated
timeout := e.resolver.scatterConn.gateway.buffer.GetConfig().MaxFailoverDuration / (MaxBufferingRetries - 1) | ||
timeout := 30 * time.Second | ||
if e.resolver.scatterConn.gateway.buffer != nil { | ||
timeout = e.resolver.scatterConn.gateway.buffer.GetConfig().MaxFailoverDuration / (MaxBufferingRetries - 1) | ||
} | ||
if waitForNewerVSchema(ctx, e, lastVSchemaCreated, timeout) { |
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.
Let's add a unit test for the change.
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.
LGTM! I was going to suggest the same thing though ^^ 🙂 If it's very difficult to do for some reason then we can put that off.
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.
@harshit-gangal, where would I do that now and what should the unit test check for? I don't see any obvious framework to add a test for newExecute
and there is no plan_execute_test.go
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.
It can be placed in executor_test.
Let me see if I can add it
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
…6922) Signed-off-by: Rohit Nayak <[email protected]> Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Harshit Gangal <[email protected]>
…6922) Signed-off-by: Rohit Nayak <[email protected]> Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Harshit Gangal <[email protected]>
…is disabled (#16922) (#16935) Signed-off-by: Rohit Nayak <[email protected]> Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Harshit Gangal <[email protected]>
…is disabled (#16922) (#16936) Signed-off-by: Rohit Nayak <[email protected]> Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Harshit Gangal <[email protected]>
Description
When buffering is turned off in
vtgate
there is a possibility of a panic when a query is retried, because of this codetimeout := e.resolver.scatterConn.gateway.buffer.GetConfig().MaxFailoverDuration / (MaxBufferingRetries - 1)
introduced here: https://github.com/vitessio/vitess/pull/15701/files#diff-19aa815da9f21f65b55cc865090e2cefa77af98b30b134936853f7763898d255R107 in v20.0.This PR uses the default timeout of 30 seconds, used earlier, if buffering is turned off.
Related Issue(s)
#16858
Checklist
Deployment Notes