tests: Protect globalLocalDrives against races (#16800)

This commit is contained in:
Klaus Post
2023-03-13 06:04:20 -07:00
committed by GitHub
parent cde7eeb660
commit 628042e65e
4 changed files with 25 additions and 2 deletions

View File

@@ -353,8 +353,10 @@ var (
globalServiceFreezeCnt int32
globalServiceFreezeMu sync.Mutex // Updates.
// List of local drives to this node, this is only set during server startup.
globalLocalDrives []StorageAPI
// List of local drives to this node, this is only set during server startup,
// and should never be mutated. Hold globalLocalDrivesMu to access.
globalLocalDrives []StorageAPI
globalLocalDrivesMu sync.RWMutex
// Is MINIO_CI_CD set?
globalIsCICD bool