From 6005ad3d487c3a7c68c0680dc5a0924f713358ad Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Thu, 8 Feb 2024 12:28:05 -0800 Subject: [PATCH] Fix shared top locks client (#19018) `client` is shared across goroutines. Seen with `mc support top locks` on minio built with `-race`. --- cmd/notification.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/notification.go b/cmd/notification.go index 4585c2806..19c2bc0a9 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -460,6 +460,7 @@ func (sys *NotificationSys) GetLocks(ctx context.Context, r *http.Request) []*Pe g := errgroup.WithNErrs(len(sys.peerClients)) for index, client := range sys.peerClients { index := index + client := client g.Go(func() error { if client == nil { return errPeerNotReachable