Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Dec 12, 2024
1 parent 2bec10c commit 71d84d5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions go/vt/vtorc/logic/tablet_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,15 @@ func parseClustersToWatch() {
}
shardsToWatch[ks] = true
} else {
// Remove trailing slash, if exists
if strings.HasSuffix(ks, "/") {
ks = strings.TrimSuffix(ks, "/")
}
// Remove trailing slash, if exists.
ks = strings.TrimSuffix(ks, "/")

// Assume this is a keyspace and find all shards in keyspace.
ctx, cancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout)
defer cancel()
shards, err := ts.GetShardNames(ctx, ks)
if err != nil {
// Log the errr and continue
// Log the err and continue.
log.Errorf("Error fetching shards for keyspace: %v", ks)
continue
}
Expand Down

0 comments on commit 71d84d5

Please sign in to comment.