mirror of
https://github.com/minio/minio.git
synced 2025-01-29 07:26:00 -05:00
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:
parent
402b798f1b
commit
afea40cc0f
@ -570,10 +570,7 @@ func auditObjectErasureSet(ctx context.Context, api, object string, set *erasure
|
|||||||
|
|
||||||
// NewNSLock - initialize a new namespace RWLocker instance.
|
// NewNSLock - initialize a new namespace RWLocker instance.
|
||||||
func (s *erasureSets) NewNSLock(bucket string, objects ...string) RWLocker {
|
func (s *erasureSets) NewNSLock(bucket string, objects ...string) RWLocker {
|
||||||
if len(objects) == 1 {
|
return s.sets[0].NewNSLock(bucket, objects...)
|
||||||
return s.getHashedSet(objects[0]).NewNSLock(bucket, objects...)
|
|
||||||
}
|
|
||||||
return s.getHashedSet("").NewNSLock(bucket, objects...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetDriveCount returns the current drives per set.
|
// SetDriveCount returns the current drives per set.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user