Skip to content

Commit

Permalink
Remove unneeded check
Browse files Browse the repository at this point in the history
  • Loading branch information
jhalterman committed Aug 14, 2024
1 parent 28a2096 commit d8ca577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ring/ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func (r *Ring) ShuffleShard(identifier string, size int) ReadRing {
// same identifier are with the same lookbackPeriod and increasing values of now.
func (r *Ring) ShuffleShardWithLookback(identifier string, size int, lookbackPeriod time.Duration, now time.Time) ReadRing {
// Nothing to do if the shard size is not smaller than the actual ring.
if lookbackPeriod > 0 && (size <= 0 || r.InstancesCount() <= size) {
if size <= 0 || r.InstancesCount() <= size {
return r
}

Expand Down

0 comments on commit d8ca577

Please sign in to comment.