From a700415c9ccada9affdbb8499d353dede9212418 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 2 Sep 2021 10:33:12 +0100 Subject: [PATCH] locks: Top locks to build list of locks based on resource name (#13134) Top locks fails to show resources of multi delete objects call because this is about a single lock of multiple resources. This commit fixes it. --- cmd/admin-handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 7e2bdae7e..e6e116daf 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -382,10 +382,10 @@ func topLockEntries(peerLocks []*PeerLocks, stale bool) madmin.LockEntries { for _, locks := range peerLock.Locks { for k, v := range locks { for _, lockReqInfo := range v { - if val, ok := entryMap[lockReqInfo.UID]; ok { + if val, ok := entryMap[k]; ok { val.ServerList = append(val.ServerList, peerLock.Addr) } else { - entryMap[lockReqInfo.UID] = lriToLockEntry(lockReqInfo, k, peerLock.Addr) + entryMap[k] = lriToLockEntry(lockReqInfo, k, peerLock.Addr) } } }