Skip to content

Commit

Permalink
Keyspace can be used w/o shard
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Nov 4, 2023
1 parent 8dcf05b commit f1b29c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/vt/vtctl/grpcvtctldserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,9 @@ func (s *VtctldServer) GetTablets(ctx context.Context, req *vtctldatapb.GetTable
defer panicHandler(&err)

span.Annotate("cells", strings.Join(req.Cells, ","))
if req.Keyspace != "" {
span.Annotate("keyspace", req.Keyspace)
}
if req.TabletType != topodatapb.TabletType_UNKNOWN {
span.Annotate("tablet_type", topodatapb.TabletType_name[int32(req.TabletType)])
}
Expand Down Expand Up @@ -1978,7 +1981,6 @@ func (s *VtctldServer) GetTablets(ctx context.Context, req *vtctldatapb.GetTable
err = fmt.Errorf("GetTabletMap(%v) failed: %w", req.TabletAliases, err)
}
case req.Keyspace != "" && req.Shard != "":
span.Annotate("keyspace", req.Keyspace)
span.Annotate("shard", req.Shard)

tabletMap, err = s.ts.GetTabletMapForShard(ctx, req.Keyspace, req.Shard)
Expand Down

0 comments on commit f1b29c0

Please sign in to comment.