Skip to content

Commit 77c28ce

Browse files
rename
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
1 parent 8c75085 commit 77c28ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

go/vt/vtorc/logic/tablet_discovery.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ func refreshAllTablets() {
8282
}, false /* forceRefresh */)
8383
}
8484

85-
// keyRangesContainShard returns true if a slice of key ranges contains the provided shard.
86-
func keyRangesContainShard(keyRanges []*topodatapb.KeyRange, shard string) (bool, error) {
85+
// hasShardInKeyRanges returns true if a slice of key ranges contains the provided shard.
86+
func hasShardInKeyRanges(shard string, keyRanges []*topodatapb.KeyRange) (bool, error) {
8787
_, shardKeyRange, err := topo.ValidateShardName(shard)
8888
if err != nil {
8989
return false, err
@@ -139,7 +139,7 @@ func getKeyspaceShardsToWatch() ([]*topo.KeyspaceShard, error) {
139139
}
140140

141141
for _, s := range shards {
142-
if found, err := keyRangesContainShard(watchKeyRanges, s); err != nil {
142+
if found, err := hasShardInKeyRanges(s, watchKeyRanges); err != nil {
143143
log.Errorf("Failed to parse key ranges for shard %q: %+v", s, err)
144144
} else if found {
145145
keyspaceShardsMu.Lock()

0 commit comments

Comments
 (0)