We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42f0afd commit ba198abCopy full SHA for ba198ab
pkg/ring/ring.go
@@ -500,6 +500,7 @@ func (r *Ring) ShuffleShard(identifier string, size int) ReadRing {
500
random := rand.New(rand.NewSource(seed))
501
502
r.mtx.RLock()
503
+ defer r.mtx.RUnlock()
504
505
// We expect the shard size to be divisible by the number of zones, in order to
506
// have nodes balanced across zones. If it's not, we do round up.
@@ -544,8 +545,6 @@ func (r *Ring) ShuffleShard(identifier string, size int) ReadRing {
544
545
}
546
547
- r.mtx.RUnlock()
548
-
549
// Build a read-only ring for the shard.
550
shardDesc := &Desc{Ingesters: shard}
551
shardTokensByZone := shardDesc.getTokensByZone()
0 commit comments