mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
List buckets only once per sub-system initialization (#8333)
Current master repeatedly calls ListBuckets() during initialization of multiple sub-systems Use single ListBuckets() call for each sub-system as follows - LifeCycle - Policy - Notification
This commit is contained in:
committed by
kannappanr
parent
fb1374f2f7
commit
8b80eca184
@@ -294,11 +294,16 @@ func prepareAdminXLTestBed() (*adminXLTestBed, error) {
|
||||
globalIAMSys = NewIAMSys()
|
||||
globalIAMSys.Init(objLayer)
|
||||
|
||||
buckets, err := objLayer.ListBuckets(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
globalPolicySys = NewPolicySys()
|
||||
globalPolicySys.Init(objLayer)
|
||||
globalPolicySys.Init(buckets, objLayer)
|
||||
|
||||
globalNotificationSys = NewNotificationSys(globalServerConfig, globalEndpoints)
|
||||
globalNotificationSys.Init(objLayer)
|
||||
globalNotificationSys.Init(buckets, objLayer)
|
||||
|
||||
// Setup admin mgmt REST API handlers.
|
||||
adminRouter := mux.NewRouter()
|
||||
|
||||
Reference in New Issue
Block a user