fix a data race in IAM loading (#16742)

This commit is contained in:
Poorna 2023-03-02 14:32:54 -08:00 committed by GitHub
parent d07089ceac
commit 0f2b95b497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,7 +349,9 @@ func (iamOS *IAMObjectStore) listAllIAMConfigItems(ctx context.Context) (map[str
// Assumes cache is locked by caller.
func (iamOS *IAMObjectStore) loadAllFromObjStore(ctx context.Context, cache *iamCache) error {
bootstrapTrace("loading all IAM items")
if iamOS.objAPI == nil {
return errServerNotInitialized
}
listedConfigItems, err := iamOS.listAllIAMConfigItems(ctx)
if err != nil {
return err