From afea40cc0fe1d823359ecbd229a0425021eb897b Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 27 Sep 2024 02:10:19 -0700 Subject: [PATCH] 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 --- cmd/erasure-sets.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/erasure-sets.go b/cmd/erasure-sets.go index 22e8f1229..d426b11f1 100644 --- a/cmd/erasure-sets.go +++ b/cmd/erasure-sets.go @@ -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.