-
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
Check tablet alias before removing after error stream #7915
Conversation
Signed-off-by: crowu <y.wu4515@gmail.com>
go/vt/discovery/healthcheck.go
Outdated
@@ -448,8 +453,7 @@ func (hc *HealthCheckImpl) updateHealth(th *TabletHealth, prevTarget *query.Targ | |||
} | |||
} | |||
case isPrimary && !isPrimaryUp: | |||
// No healthy master tablet | |||
hc.healthy[targetKey] = []*TabletHealth{} | |||
hc.deleteHealthDateLocked(targetKey, tabletAlias) |
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.
I don't believe this is correct. We want to delete it from healthy
but not from healthData
.
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.
Updated to keep it same as the original logic.
Signed-off-by: crowu <y.wu4515@gmail.com>
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
This should also go into 10.0 (release-10.0 branch) |
go/vt/discovery/healthcheck.go
Outdated
// No healthy master tablet | ||
hc.healthy[targetKey] = []*TabletHealth{} | ||
if healthy, ok := hc.healthy[targetKey]; ok && len(healthy) > 0 { | ||
var newHealthy []*TabletHealth |
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.
@deepthi i don't know if this is the proper way to do the deletion in this case, please let me know if you have better suggestions
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.
This is fine too.
54b3b53
to
c477844
Compare
Signed-off-by: crowu y.wu4515@gmail.com
Description
When VTGate gets an error from the primary tablet connection, it should not just nuke out all the healthy tablets. Because an external reparent process might have already changed the primary tablet.
Instead we should only try to remove the tablet with stream error from the map
Related Issue(s)
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: