From a9feaacb67c5c3032e92868d173c92685279c490 Mon Sep 17 00:00:00 2001 From: Bo Du Date: Wed, 2 Dec 2020 14:41:35 -0500 Subject: [PATCH] Remove short-circuits. --- src/dbnode/storage/bootstrap/result/shard_ranges.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/dbnode/storage/bootstrap/result/shard_ranges.go b/src/dbnode/storage/bootstrap/result/shard_ranges.go index f3e0084d08..f17f3bbbb5 100644 --- a/src/dbnode/storage/bootstrap/result/shard_ranges.go +++ b/src/dbnode/storage/bootstrap/result/shard_ranges.go @@ -136,11 +136,6 @@ func (r shardTimeRanges) IsSuperset(other ShardTimeRanges) bool { return true } - // Short-circuit if we have more shards than other. - if len(r) < other.Len() { - return false - } - // Check if other ranges has any shards we do not have. for shard := range other.Iter() { if _, ok := r.Get(shard); !ok { @@ -154,11 +149,6 @@ func (r shardTimeRanges) IsSuperset(other ShardTimeRanges) bool { continue } - // Short-circuit if we have more ranges than other. - if ranges.Len() < otherRanges.Len() { - return false - } - it := ranges.Iter() otherIt := otherRanges.Iter()