bugfix: fix nil pointer in vtgate on topo connection error#13010
Merged
frouioui merged 3 commits intovitessio:mainfrom May 10, 2023
Merged
bugfix: fix nil pointer in vtgate on topo connection error#13010frouioui merged 3 commits intovitessio:mainfrom
frouioui merged 3 commits intovitessio:mainfrom
Conversation
Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com>
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Member
harshit-gangal
left a comment
There was a problem hiding this comment.
changes look good. But, a test would be needed here.
Contributor
Author
|
@harshit-gangal added test to ensure the error is not thrown if |
frouioui
reviewed
May 9, 2023
harshit-gangal
approved these changes
May 10, 2023
frouioui
approved these changes
May 10, 2023
4 tasks
timvaillancourt
pushed a commit
to slackhq/vitess
that referenced
this pull request
May 28, 2024
…13010) * fix nil pointer in vtgate on topo connection error Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> * add test Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> * fix year Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> --------- Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> Co-authored-by: Olga Shestopalova <oshestopalova@hubspot.com>
4 tasks
timvaillancourt
added a commit
to slackhq/vitess
that referenced
this pull request
May 28, 2024
* bugfix: fix nil pointer in vtgate on topo connection error (vitessio#13010) * fix nil pointer in vtgate on topo connection error Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> * add test Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> * fix year Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> --------- Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> Co-authored-by: Olga Shestopalova <oshestopalova@hubspot.com> * VTGate Buffering: Use a more accurate heuristic for determining if we're doing a reshard (vitessio#13856) Signed-off-by: Matt Lord <mattalord@gmail.com> --------- Signed-off-by: Olga Shestopalova <oshestopalova@hubspot.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Olga Shestopalova <olgash@mit.edu> Co-authored-by: Olga Shestopalova <oshestopalova@hubspot.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
This file contains hidden or 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
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
We see vtgate container restarts whenever there's a problem connecting to zk:
This is not desirable, there should be an error, but it should not kill the whole vtgate process.
This is called from this healthcheck code, which does a nil check above, but then proceeds to this method without another nil check. If the return value of the method I have modified is nil, the healthcheck assumes the kss is in some sort of transient state and returns out, so this is safe to return nil from
The error we see above the nil pointer comes from this same file
Related Issue(s)
Checklist
Deployment Notes