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.
This commit is contained in:
Anis Elleuch 2021-09-02 10:33:12 +01:00 committed by Minio Trusted
parent 47e54fb823
commit a700415c9c

View File

@ -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)
}
}
}