mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
limit number of buckets to 500k (#15668)
500k is a reasonable limit for any single MinIO cluster deployment, in future we may increase this value. However for now we are going to keep this limit.
This commit is contained in:
@@ -45,6 +45,14 @@ type BucketMetadataSys struct {
|
||||
metadataMap map[string]BucketMetadata
|
||||
}
|
||||
|
||||
// Count returns number of bucket metadata map entries.
|
||||
func (sys *BucketMetadataSys) Count() int {
|
||||
sys.RLock()
|
||||
defer sys.RUnlock()
|
||||
|
||||
return len(sys.metadataMap)
|
||||
}
|
||||
|
||||
// Remove bucket metadata from memory.
|
||||
func (sys *BucketMetadataSys) Remove(bucket string) {
|
||||
if globalIsGateway {
|
||||
|
||||
Reference in New Issue
Block a user