mirror of
https://github.com/minio/minio.git
synced 2025-01-24 13:13:16 -05:00
reload bucket metadata outside the locker (#9659)
This commit is contained in:
parent
2164984d2b
commit
baa30f4289
@ -258,9 +258,9 @@ func (sys *BucketMetadataSys) GetConfig(bucket string) (BucketMetadata, error) {
|
||||
return newBucketMetadata(bucket), errInvalidArgument
|
||||
}
|
||||
|
||||
sys.Lock()
|
||||
defer sys.Unlock()
|
||||
sys.RLock()
|
||||
meta, ok := sys.metadataMap[bucket]
|
||||
sys.RUnlock()
|
||||
if ok {
|
||||
return meta, nil
|
||||
}
|
||||
@ -268,7 +268,9 @@ func (sys *BucketMetadataSys) GetConfig(bucket string) (BucketMetadata, error) {
|
||||
if err != nil {
|
||||
return meta, err
|
||||
}
|
||||
sys.Lock()
|
||||
sys.metadataMap[bucket] = meta
|
||||
sys.Unlock()
|
||||
return meta, nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user