mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Merge initConfig logic to ConfigSys (#6312)
This commit is contained in:
committed by
kannappanr
parent
bf14e5ce1b
commit
7d7e21aebb
@@ -2411,18 +2411,6 @@ func migrateV27ToV28() error {
|
||||
|
||||
// Migrates '.minio.sys/config.json' v27 to v28.
|
||||
func migrateMinioSysConfig(objAPI ObjectLayer) error {
|
||||
// Construct path to config.json for the given bucket.
|
||||
configFile := path.Join(bucketConfigPrefix, minioConfigFile)
|
||||
transactionConfigFile := configFile + ".transaction"
|
||||
|
||||
// As object layer's GetObject() and PutObject() take respective lock on minioMetaBucket
|
||||
// and configFile, take a transaction lock to avoid race.
|
||||
objLock := globalNSMutex.NewNSLock(minioMetaBucket, transactionConfigFile)
|
||||
if err := objLock.GetLock(globalOperationTimeout); err != nil {
|
||||
return err
|
||||
}
|
||||
defer objLock.Unlock()
|
||||
|
||||
return migrateV27ToV28MinioSys(objAPI)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user