use GlobalContext whenever possible (#9280)

This change is throughout the codebase to
ensure that all codepaths honor GlobalContext
This commit is contained in:
Harshavardhana
2020-04-09 09:30:02 -07:00
committed by GitHub
parent 1b45be0d60
commit f44cfb2863
76 changed files with 374 additions and 409 deletions
+3 -3
View File
@@ -80,7 +80,7 @@ func newXLZones(endpointZones EndpointZones) (ObjectLayer, error) {
}
}
if !z.SingleZone() {
z.quickHealBuckets(context.Background())
z.quickHealBuckets(GlobalContext)
}
return z, nil
}
@@ -326,7 +326,7 @@ func undoMakeBucketZones(bucket string, zones []*xlSets, errs []error) {
index := index
g.Go(func() error {
if errs[index] == nil {
return zones[index].DeleteBucket(context.Background(), bucket, false)
return zones[index].DeleteBucket(GlobalContext, bucket, false)
}
return nil
}, index)
@@ -1286,7 +1286,7 @@ func undoDeleteBucketZones(bucket string, zones []*xlSets, errs []error) {
index := index
g.Go(func() error {
if errs[index] == nil {
return zones[index].MakeBucketWithLocation(context.Background(), bucket, "")
return zones[index].MakeBucketWithLocation(GlobalContext, bucket, "")
}
return nil
}, index)