Skip to content

healthcheck: use isIncluded correctly to fix replica/rdonly routing bug#6904

Merged
deepthi merged 2 commits intovitessio:masterfrom
planetscale:ds-multicell-hc
Oct 22, 2020
Merged

healthcheck: use isIncluded correctly to fix replica/rdonly routing bug#6904
deepthi merged 2 commits intovitessio:masterfrom
planetscale:ds-multicell-hc

Conversation

@deepthi
Copy link
Collaborator

@deepthi deepthi commented Oct 20, 2020

In a multi-cell scenario, we want to exclude REPLICA/RDONLY tablets in other cells from vtgate routing.
There was a bug in the logic in healthcheck that excludes these tablets. Whenever there was a healthcheck update for a tablet in "another" cell, all tablets in the healthy list were being dropped out.
Tested manually using a multi-cell cluster. An endtoend test will be added in a separate PR.

Signed-off-by: deepthi deepthi@planetscale.com

Signed-off-by: deepthi <deepthi@planetscale.com>
Copy link
Member

@enisoc enisoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deepthi deepthi mentioned this pull request Oct 20, 2020
if shr.Target.TabletType != topodata.TabletType_MASTER {
// we re-sort the healthy tablet list whenever we get a health update for tablets we can route to
// tablets from other cells for non-master targets should not trigger a re-sort
// they should also be excluded from healthy list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix punctuation (and caps). Took me a while to realize that each line is a separate sentence.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies. I have fixed it now.

Signed-off-by: deepthi <deepthi@planetscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants