mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
fix: reduce the load on CPU when loading users/policies (#8984)
Trying to be conservative by slowing ourselves down on a regular basis.
This commit is contained in:
@@ -24,7 +24,6 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
xhttp "github.com/minio/minio/cmd/http"
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
@@ -1364,16 +1363,7 @@ func (z *xlZones) HealObjects(ctx context.Context, bucket, prefix string, healOb
|
||||
continue
|
||||
}
|
||||
|
||||
if httpServer := newHTTPServerFn(); httpServer != nil {
|
||||
// Wait at max 10 minute for an inprogress request before proceeding to heal
|
||||
waitCount := 600
|
||||
// Any requests in progress, delay the heal.
|
||||
for (httpServer.GetRequestCount() >= int32(zoneDrivesPerSet[zoneIndex])) &&
|
||||
waitCount > 0 {
|
||||
waitCount--
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
}
|
||||
waitForLowHTTPReq(int32(zoneDrivesPerSet[zoneIndex]))
|
||||
|
||||
if err := healObject(bucket, entry.Name); err != nil {
|
||||
return toObjectErr(err, bucket, entry.Name)
|
||||
|
||||
Reference in New Issue
Block a user