Description
Feature Description
👋 I would like to be able to start a tablet as DRAINED
tablet-type, in order to perform some offline actions. My goal with starting as DRAINED
is to:
- Prevent
vtgate
from sending traffic to the tablet that is being worked on - Prevent VTOrc to fix replication while the tablet is worked on
Today you can start vttablet
as only:
SPARE
REPLICA
RDONLY
Unfortunately all of these tablet-types are considered by VTOrc/topo-helpers (validly, in my opinion) as types that must replicate at all times. This means there is no way to start a vttablet
that is ignored by VTGate and VTOrc initially. What this can mean in practice is VTOrc intervening or complaining about problems that cannot be fixed, for example ReplicationStopped
on a tablet where offline work is occurring
// DRAINED is the type a server goes into when used by Vitess tools
// to perform an offline action. It is a serving type (as
// the tools processes may need to run queries), but it's not used
// to route queries from Vitess users. In this state,
// this tablet is dedicated to the process that uses it.
TabletType_DRAINED TabletType = 8
DRAINED
feels like the perfect tablet-type for this case, but it's not in the allow-list of types vttablet
can startup as
This issue proposes DRAINED
is added to the allow-list so a user can start a tablet that is ignored by VTGate + VTOrc simultaneously
Use Case(s)
A user that wants to bring up a tablet and perform offline work and would like to avoid:
- VTGate sending traffic to this tablet
- VTOrc fixing/complaining about problems (eg replication stopped) while offline work occurs
A direct example: is a tablet that is quarantined for investigation. A vttablet
that functional but hidden from traffic and simultaneously is not actioned by VTOrc is ideal