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:
Harshavardhana
2022-09-09 03:06:34 -07:00
committed by GitHub
parent 87f0c8e7e8
commit b579163802
6 changed files with 228 additions and 198 deletions

View File

@@ -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 {