mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 14:10:25 +03:00
use GlobalContext whenever possible (#9280)
This change is throughout the codebase to ensure that all codepaths honor GlobalContext
This commit is contained in:
+5
-5
@@ -363,7 +363,7 @@ func newXLSets(endpoints Endpoints, storageDisks []StorageAPI, format *formatXLV
|
||||
mrfUploadCh: make(chan partialUpload, 10000),
|
||||
}
|
||||
|
||||
go s.sets[i].cleanupStaleMultipartUploads(context.Background(),
|
||||
go s.sets[i].cleanupStaleMultipartUploads(GlobalContext,
|
||||
GlobalMultipartCleanupInterval, GlobalMultipartExpiry, GlobalServiceDoneCh)
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ func undoMakeBucketSets(bucket string, sets []*xlObjects, errs []error) {
|
||||
index := index
|
||||
g.Go(func() error {
|
||||
if errs[index] == nil {
|
||||
return sets[index].DeleteBucket(context.Background(), bucket, false)
|
||||
return sets[index].DeleteBucket(GlobalContext, bucket, false)
|
||||
}
|
||||
return nil
|
||||
}, index)
|
||||
@@ -712,7 +712,7 @@ func undoDeleteBucketSets(bucket string, sets []*xlObjects, errs []error) {
|
||||
index := index
|
||||
g.Go(func() error {
|
||||
if errs[index] == nil {
|
||||
return sets[index].MakeBucketWithLocation(context.Background(), bucket, "")
|
||||
return sets[index].MakeBucketWithLocation(GlobalContext, bucket, "")
|
||||
}
|
||||
return nil
|
||||
}, index)
|
||||
@@ -1026,7 +1026,7 @@ func (s *xlSets) listObjectsNonSlash(ctx context.Context, bucket, prefix, marker
|
||||
defer close(endWalkCh)
|
||||
|
||||
const ndisks = 3
|
||||
entryChs := s.startMergeWalksN(context.Background(), bucket, prefix, "", true, endWalkCh, ndisks)
|
||||
entryChs := s.startMergeWalksN(GlobalContext, bucket, prefix, "", true, endWalkCh, ndisks)
|
||||
|
||||
var objInfos []ObjectInfo
|
||||
var eof bool
|
||||
@@ -1175,7 +1175,7 @@ func (s *xlSets) listObjects(ctx context.Context, bucket, prefix, marker, delimi
|
||||
if entryChs == nil {
|
||||
endWalkCh = make(chan struct{})
|
||||
// start file tree walk across at most randomly 3 disks in a set.
|
||||
entryChs = s.startMergeWalksN(context.Background(), bucket, prefix, marker, recursive, endWalkCh, ndisks)
|
||||
entryChs = s.startMergeWalksN(GlobalContext, bucket, prefix, marker, recursive, endWalkCh, ndisks)
|
||||
}
|
||||
|
||||
entries := mergeEntriesCh(entryChs, maxKeys, ndisks)
|
||||
|
||||
Reference in New Issue
Block a user