mirror of
https://github.com/minio/minio.git
synced 2026-11-12 22:42:20 +00:00
fix: Speed up multi-object delete by taking bulk locks (#8974)
Change distributed locking to allow taking bulk locks
across objects, reduces usually 1000 calls to 1.
Also allows for situations where multiple clients sends
delete requests to objects with following names
```
{1,2,3,4,5}
```
```
{5,4,3,2,1}
```
will block and ensure that we do not fail the request
on each other.
This commit is contained in:
1 parent
852fb320f7
commit
ab7d3cd508
24 files changed
+305
-580
No files matched your search
@@ -337,14 +337,6 @@ func (sys *IAMSys) Load() error {
|
||||
|
||||
// Perform IAM configuration migration.
|
||||
func (sys *IAMSys) doIAMConfigMigration(objAPI ObjectLayer) error {
|
||||
// Take IAM configuration migration lock
|
||||
lockPath := iamConfigPrefix + "/migration.lock"
|
||||
objLock := objAPI.NewNSLock(context.Background(), minioMetaBucket, lockPath)
|
||||
if err := objLock.GetLock(globalOperationTimeout); err != nil {
|
||||
return err
|
||||
}
|
||||
defer objLock.Unlock()
|
||||
|
||||
return sys.store.migrateBackendFormat(objAPI)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user