mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Increase context timeout for bandwidth throttled reader (#12820)
increase default timeout up to one hour for toy setups. fixes #12812
This commit is contained in:
committed by
GitHub
parent
bfbdb8f0a8
commit
b6cd54779c
@@ -179,3 +179,11 @@ func (m *Monitor) SetBandwidthLimit(bucket string, limit int64) {
|
||||
t.Limiter = rate.NewLimiter(newlimit, int(t.NodeBandwidthPerSec))
|
||||
m.bucketThrottle[bucket] = t
|
||||
}
|
||||
|
||||
// IsThrottled returns true if a bucket has bandwidth throttling enabled.
|
||||
func (m *Monitor) IsThrottled(bucket string) bool {
|
||||
m.tlock.RLock()
|
||||
defer m.tlock.RUnlock()
|
||||
_, ok := m.bucketThrottle[bucket]
|
||||
return ok
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user