Gather REPLICA tablet types from Vitess only by timvaillancourt · Pull Request #118 · github/freno
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