Skip to content

Commit

Permalink
Merge pull request #119 from vinted/0370_locking_fix
Browse files Browse the repository at this point in the history
receive/multitsdb: defer unlock properly (thanos-io#7857)
  • Loading branch information
GiedriusS authored Oct 24, 2024
2 parents 44d4890 + b602a5d commit 7035d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/receive/multitsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,10 @@ func (t *MultiTSDB) TSDBLocalClients() []store.Client {

t.mtx.RUnlock()
t.mtx.Lock()
defer t.mtx.Unlock()
if !t.tsdbClientsNeedUpdate {
return t.tsdbClients
}
defer t.mtx.Unlock()

res := make([]store.Client, 0, len(t.tenants))
for _, tenant := range t.tenants {
Expand Down

0 comments on commit 7035d86

Please sign in to comment.