fix: keep locks based on the first pool, first EC set (#93)

multi-object deletion may or may not compete with locks
granted for other callers, causing concurrent operations
to succeed on each other.

A continuation of the PR https://github.com/minio/minio/pull/20356
This commit is contained in:
Harshavardhana 2024-09-27 02:10:19 -07:00
parent 402b798f1b
commit afea40cc0f
1 changed files with 1 additions and 4 deletions

View File

@ -570,10 +570,7 @@ func auditObjectErasureSet(ctx context.Context, api, object string, set *erasure
// NewNSLock - initialize a new namespace RWLocker instance.
func (s *erasureSets) NewNSLock(bucket string, objects ...string) RWLocker {
if len(objects) == 1 {
return s.getHashedSet(objects[0]).NewNSLock(bucket, objects...)
}
return s.getHashedSet("").NewNSLock(bucket, objects...)
return s.sets[0].NewNSLock(bucket, objects...)
}
// SetDriveCount returns the current drives per set.