mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Revert "Revert "tests: Add context cancelation (#15374)""
This reverts commit 564a0afae1.
This commit is contained in:
@@ -241,11 +241,11 @@ func serverHandleEnvVars() {
|
||||
|
||||
var globalHealStateLK sync.RWMutex
|
||||
|
||||
func initAllSubsystems() {
|
||||
func initAllSubsystems(ctx context.Context) {
|
||||
globalHealStateLK.Lock()
|
||||
// New global heal state
|
||||
globalAllHealState = newHealState(true)
|
||||
globalBackgroundHealState = newHealState(false)
|
||||
globalAllHealState = newHealState(ctx, true)
|
||||
globalBackgroundHealState = newHealState(ctx, false)
|
||||
globalHealStateLK.Unlock()
|
||||
|
||||
// Initialize notification peer targets
|
||||
@@ -263,7 +263,7 @@ func initAllSubsystems() {
|
||||
}
|
||||
|
||||
// Create the bucket bandwidth monitor
|
||||
globalBucketMonitor = bandwidth.NewMonitor(GlobalContext, totalNodeCount())
|
||||
globalBucketMonitor = bandwidth.NewMonitor(ctx, totalNodeCount())
|
||||
|
||||
// Create a new config system.
|
||||
globalConfigSys = NewConfigSys()
|
||||
@@ -450,7 +450,7 @@ func serverMain(ctx *cli.Context) {
|
||||
initHelp()
|
||||
|
||||
// Initialize all sub-systems
|
||||
initAllSubsystems()
|
||||
initAllSubsystems(GlobalContext)
|
||||
|
||||
// Is distributed setup, error out if no certificates are found for HTTPS endpoints.
|
||||
if globalIsDistErasure {
|
||||
@@ -696,7 +696,7 @@ func newObjectLayer(ctx context.Context, endpointServerPools EndpointServerPools
|
||||
// For FS only, directly use the disk.
|
||||
if endpointServerPools.NEndpoints() == 1 {
|
||||
// Initialize new FS object layer.
|
||||
newObject, err = NewFSObjectLayer(endpointServerPools[0].Endpoints[0].Path)
|
||||
newObject, err = NewFSObjectLayer(ctx, endpointServerPools[0].Endpoints[0].Path)
|
||||
if err == nil {
|
||||
return newObject, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user