Skip to content
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

Gather REPLICA tablet types from Vitess only #118

Merged
merged 10 commits into from
Apr 24, 2020

Conversation

timvaillancourt
Copy link
Contributor

@timvaillancourt timvaillancourt commented Apr 22, 2020

This PR updates the Vitesssupport to only consider REPLICA tablet types for probing

Today this logic gathers any host available, including nodes that probably shouldn't get checked like MASTER, DRAINED, SPARE, BACKUP, RESTORE, etc. It can be valid for non-REPLICAs to have lag

The full list of tablet types available is here: https://godoc.org/vitess.io/vitess/go/vt/proto/topodata#TabletType

The REPLICA tablet-type is described as:

REPLICA is a slave type. It is used to serve live traffic. A REPLICA can be promoted to MASTER. A demoted MASTER will go to REPLICA.

EDIT: go mod is pulling in a v.2.1.1 version of the Vitess package I used, due to this issue here: vitessio/vitess#5019. I only use 1 x API struct so I think it's ok

Copy link

@jfudally jfudally left a comment

Choose a reason for hiding this comment

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

👍 Everything looks good to me. A safe way to test would be to branch deploy to 1 site, and check logs/freno sup to make sure it's behaving as expected.

@timvaillancourt timvaillancourt merged commit 435c726 into master Apr 24, 2020
@timvaillancourt timvaillancourt deleted the vitess-check-replicas-only branch April 24, 2020 17:04
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.

3 participants