diff --git a/pkg/receive/multitsdb.go b/pkg/receive/multitsdb.go index 4ad1b15ed2..26e6284b73 100644 --- a/pkg/receive/multitsdb.go +++ b/pkg/receive/multitsdb.go @@ -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 {