fix: avoid double ListBuckets() loading object lock (#9031)

This commit is contained in:
Harshavardhana
2020-02-24 06:39:11 +05:30
committed by GitHub
parent 224b4f13b8
commit dcd63b4146
3 changed files with 51 additions and 53 deletions

View File

@@ -263,7 +263,12 @@ func initAllSubsystems(buckets []BucketInfo, newObject ObjectLayer) (err error)
// Initialize policy system.
if err = globalPolicySys.Init(buckets, newObject); err != nil {
return fmt.Errorf("Unable to initialize policy system; %w", err)
return fmt.Errorf("Unable to initialize policy system: %w", err)
}
// Initialize bucket object lock.
if err = initBucketObjectLockConfig(buckets, newObject); err != nil {
return fmt.Errorf("Unable to initialize object lock system: %w", err)
}
// Initialize lifecycle system.
@@ -275,6 +280,7 @@ func initAllSubsystems(buckets []BucketInfo, newObject ObjectLayer) (err error)
if err = globalBucketSSEConfigSys.Init(buckets, newObject); err != nil {
return fmt.Errorf("Unable to initialize bucket encryption subsystem: %w", err)
}
return nil
}