From 8c343b67596cc81e40f9cb2d6968112e42dd5822 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 24 Feb 2025 22:51:03 +0100 Subject: [PATCH] cleanup Signed-off-by: Tim Vaillancourt --- go/vt/vtorc/logic/keyspace_shard_discovery.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/go/vt/vtorc/logic/keyspace_shard_discovery.go b/go/vt/vtorc/logic/keyspace_shard_discovery.go index fecea9f32ae..62e7be88c4a 100644 --- a/go/vt/vtorc/logic/keyspace_shard_discovery.go +++ b/go/vt/vtorc/logic/keyspace_shard_discovery.go @@ -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(...),