mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Add detailed scanner metrics (#15161)
This commit is contained in:
@@ -71,7 +71,7 @@ func (opts Config) BitrotScanCycle() (d time.Duration) {
|
||||
// Wait waits for IOCount to go down or max sleep to elapse before returning.
|
||||
// usually used in healing paths to wait for specified amount of time to
|
||||
// throttle healing.
|
||||
func (opts Config) Wait(currentIO func() int, systemIO func() int) {
|
||||
func (opts Config) Wait(currentIO func() int, activeListeners func() int) {
|
||||
configMutex.RLock()
|
||||
maxIO, maxWait := opts.IOCount, opts.Sleep
|
||||
configMutex.RUnlock()
|
||||
@@ -87,7 +87,7 @@ func (opts Config) Wait(currentIO func() int, systemIO func() int) {
|
||||
tmpMaxWait := maxWait
|
||||
|
||||
if currentIO != nil {
|
||||
for currentIO() >= maxIO+systemIO() {
|
||||
for currentIO() >= maxIO+activeListeners() {
|
||||
if tmpMaxWait > 0 {
|
||||
if tmpMaxWait < waitTick {
|
||||
time.Sleep(tmpMaxWait)
|
||||
|
||||
Reference in New Issue
Block a user