mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 21:50:22 +03:00
fix: move context timeout closer to network for Delete calls (#10897)
allowing for disconnects to be limited to the drive themselves instead of disconnecting all drives.
This commit is contained in:
@@ -24,7 +24,6 @@ import (
|
||||
"net/http"
|
||||
"path"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio-go/v7/pkg/tags"
|
||||
xhttp "github.com/minio/minio/cmd/http"
|
||||
@@ -774,13 +773,7 @@ func (er erasureObjects) deleteObject(ctx context.Context, bucket, object string
|
||||
if disks[index] == nil {
|
||||
return errDiskNotFound
|
||||
}
|
||||
tctx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||
defer cancel()
|
||||
err := cleanupDir(tctx, disks[index], minioMetaTmpBucket, tmpObj)
|
||||
if err != nil && err != errVolumeNotFound {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return cleanupDir(ctx, disks[index], minioMetaTmpBucket, tmpObj)
|
||||
}, index)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user