mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
lock: improve locker initialization at init (#8776)
Use reference format to initialize lockers during startup, also handle `nil` for NetLocker in dsync and remove *errorLocker* implementation Add further tuning parameters such as - DialTimeout is now 15 seconds from 30 seconds - KeepAliveTimeout is not 20 seconds, 5 seconds more than default 15 seconds - ResponseHeaderTimeout to 10 seconds - ExpectContinueTimeout is reduced to 3 seconds - DualStack is enabled by default remove setting it to `true` - Reduce IdleConnTimeout to 30 seconds from 1 minute to avoid idleConn build up Fixes #8773
This commit is contained in:
@@ -200,9 +200,6 @@ func initSafeMode(buckets []BucketInfo) (err error) {
|
||||
}
|
||||
}(objLock)
|
||||
|
||||
// Calls New() and initializes all sub-systems.
|
||||
newAllSubsystems()
|
||||
|
||||
// Migrate all backend configs to encrypted backend configs, optionally
|
||||
// handles rotating keys for encryption.
|
||||
if err = handleEncryptedConfigBackend(newObject, true); err != nil {
|
||||
@@ -365,6 +362,16 @@ func serverMain(ctx *cli.Context) {
|
||||
globalObjectAPI = newObject
|
||||
globalObjLayerMutex.Unlock()
|
||||
|
||||
// Calls New() and initializes all sub-systems.
|
||||
newAllSubsystems()
|
||||
|
||||
// Enable healing to heal drives if possible
|
||||
if globalIsXL {
|
||||
initBackgroundHealing()
|
||||
initLocalDisksAutoHeal()
|
||||
initGlobalHeal()
|
||||
}
|
||||
|
||||
buckets, err := newObject.ListBuckets(context.Background())
|
||||
if err != nil {
|
||||
logger.Fatal(err, "Unable to list buckets")
|
||||
@@ -391,12 +398,6 @@ func serverMain(ctx *cli.Context) {
|
||||
initDataUsageStats()
|
||||
initDailyLifecycle()
|
||||
|
||||
if globalIsXL {
|
||||
initBackgroundHealing()
|
||||
initLocalDisksAutoHeal()
|
||||
initGlobalHeal()
|
||||
}
|
||||
|
||||
// Disable safe mode operation, after all initialization is over.
|
||||
globalObjLayerMutex.Lock()
|
||||
globalSafeMode = false
|
||||
|
||||
Reference in New Issue
Block a user