mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Clean up monitor on delete bucket (#10698)
This commit is contained in:
parent
bd2131ba34
commit
0b53e30ecb
@ -49,6 +49,7 @@ func (sys *BucketMetadataSys) Remove(bucket string) {
|
||||
}
|
||||
sys.Lock()
|
||||
delete(sys.metadataMap, bucket)
|
||||
globalBucketMonitor.DeleteBucket(bucket)
|
||||
sys.Unlock()
|
||||
}
|
||||
|
||||
|
@ -170,3 +170,10 @@ func (m *Monitor) track(bucket string, object string, timeNow time.Time) *bucket
|
||||
b := m.getBucketMeasurement(bucket, timeNow)
|
||||
return b
|
||||
}
|
||||
|
||||
func (m *Monitor) DeleteBucket(bucket string) {
|
||||
m.lock.Lock()
|
||||
defer m.lock.Unlock()
|
||||
delete(m.activeBuckets, bucket)
|
||||
delete(m.bucketThrottle, bucket)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user