Fix cache locking to use local namespace locking (#8529)

This commit is contained in:
Harshavardhana
2019-11-16 13:44:28 -08:00
committed by GitHub
parent c9be601988
commit a8e156d6a5
2 changed files with 13 additions and 8 deletions

View File

@@ -291,6 +291,11 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
// - compression
verifyObjectLayerFeatures("gateway "+gatewayName, newObject)
// Disable safe mode operation, after all initialization is over.
globalObjLayerMutex.Lock()
globalSafeMode = false
globalObjLayerMutex.Unlock()
// Prints the formatted startup message once object layer is initialized.
if !globalCLIContext.Quiet {
mode := globalMinioModeGatewayPrefix + gatewayName
@@ -306,11 +311,6 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
printGatewayStartupMessage(getAPIEndpoints(), gatewayName)
}
// Disable safe mode operation, after all initialization is over.
globalObjLayerMutex.Lock()
globalSafeMode = false
globalObjLayerMutex.Unlock()
// Set uptime time after object layer has initialized.
globalBootTime = UTCNow()