Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
  • Loading branch information
timvaillancourt committed Feb 24, 2025
1 parent e754104 commit 8c343b6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions go/vt/vtorc/logic/keyspace_shard_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,19 @@ func refreshAllShards(ctx context.Context, keyspaceName string) error {
}
savedShards := make(map[string]bool, len(shardInfos))
for _, shardInfo := range shardInfos {
shardName := shardInfo.ShardName()
shouldRefresh, err := shouldWatchShard(shardInfo)
shouldWatchShard, err := shouldWatchShard(shardInfo)
if err != nil {
log.Error(err)
return err
}
if !shouldRefresh {
if !shouldWatchShard {
continue
}
if err = inst.SaveShard(shardInfo); err != nil {
log.Error(err)
return err
}
savedShards[shardName] = true
savedShards[shardInfo.ShardName()] = true
}

// delete shards that were not returned by ts.FindAllShardsInKeyspace(...),
Expand Down

0 comments on commit 8c343b6

Please sign in to comment.