Skip to content

Commit 44230a0

Browse files
ejortegauClaude
andcommitted
Add EXPERIMENTAL tablet type to vtgate serving path
Allow vtgate to route queries to EXPERIMENTAL tablets by adding the type to the serving graph, SrvKeyspace partition rebuild, update stream, and SHOW TABLETS output. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> Signed-off-by: Eduardo Ortega <5791035+ejortegau@users.noreply.github.com>
1 parent e3cc812 commit 44230a0

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

go/vt/topo/tablet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func IsTrivialTypeChange(oldTabletType, newTabletType topodatapb.TabletType) boo
5959
// IsInServingGraph returns if a tablet appears in the serving graph
6060
func IsInServingGraph(tt topodatapb.TabletType) bool {
6161
switch tt {
62-
case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY:
62+
case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY, topodatapb.TabletType_EXPERIMENTAL:
6363
return true
6464
}
6565
return false
@@ -78,7 +78,7 @@ func IsRunningQueryService(tt topodatapb.TabletType) bool {
7878
// RPC service.
7979
func IsRunningUpdateStream(tt topodatapb.TabletType) bool {
8080
switch tt {
81-
case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY:
81+
case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY, topodatapb.TabletType_EXPERIMENTAL:
8282
return true
8383
}
8484
return false

go/vt/topotools/rebuild_keyspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func RebuildKeyspaceLocked(ctx context.Context, log logutil.Logger, ts *topo.Ser
126126
}
127127
}
128128

129-
servedTypes := []topodatapb.TabletType{topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY}
129+
servedTypes := []topodatapb.TabletType{topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY, topodatapb.TabletType_EXPERIMENTAL}
130130

131131
// for each entry in the srvKeyspaceMap map, we do the following:
132132
// - get the Shard structures for each shard / cell

go/vt/vtgate/executor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,8 @@ func (e *Executor) ShowVitessReplicationStatus(ctx context.Context, filter *sqlp
990990

991991
for _, s := range status {
992992
for _, ts := range s.TabletsStats {
993-
// We only want to show REPLICA and RDONLY tablets
994-
if ts.Target.TabletType != topodatapb.TabletType_REPLICA && ts.Target.TabletType != topodatapb.TabletType_RDONLY {
993+
// We only want to show REPLICA, RDONLY, and EXPERIMENTAL tablets
994+
if ts.Target.TabletType != topodatapb.TabletType_REPLICA && ts.Target.TabletType != topodatapb.TabletType_RDONLY && ts.Target.TabletType != topodatapb.TabletType_EXPERIMENTAL {
995995
continue
996996
}
997997

0 commit comments

Comments
 (0)