mirror of
https://github.com/minio/minio.git
synced 2025-11-21 10:16:03 -05:00
use GlobalContext whenever possible (#9280)
This change is throughout the codebase to ensure that all codepaths honor GlobalContext
This commit is contained in:
@@ -166,7 +166,7 @@ func initSafeMode(buckets []BucketInfo) (err error) {
|
||||
// at a given time, this big transaction lock ensures this
|
||||
// appropriately. This is also true for rotation of encrypted
|
||||
// content.
|
||||
objLock := newObject.NewNSLock(context.Background(), minioMetaBucket, transactionConfigPrefix)
|
||||
objLock := newObject.NewNSLock(GlobalContext, minioMetaBucket, transactionConfigPrefix)
|
||||
if err = objLock.GetLock(globalOperationTimeout); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -316,7 +316,7 @@ func serverMain(ctx *cli.Context) {
|
||||
setDefaultProfilerRates()
|
||||
|
||||
// Initialize globalConsoleSys system
|
||||
globalConsoleSys = NewConsoleLogger(context.Background())
|
||||
globalConsoleSys = NewConsoleLogger(GlobalContext)
|
||||
|
||||
signal.Notify(globalOSSignalCh, os.Interrupt, syscall.SIGTERM)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user