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:
Harshavardhana authored and GitHub committed 2020-02-13 06:36:23 -08:00
1 parent 64ec17b463
commit 9ecd66007f
4 files changed
+27 -38

No files matched your search

+1 -10
View File
@@ -1664,16 +1664,7 @@ func (s *xlSets) HealObjects(ctx context.Context, bucket, prefix string, healObj
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(s.drivesPerSet)) &&
waitCount > 0 {
waitCount--
time.Sleep(1 * time.Second)
}
}
waitForLowHTTPReq(int32(s.drivesPerSet))
if err := healObject(bucket, entry.Name); err != nil {
return toObjectErr(err, bucket, entry.Name)