mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
fix: heal bucket metadata right before healing bucket (#11097)
optimization mainly to avoid listing the entire `.minio.sys/buckets/.minio.sys` directory, this can get really huge and comes in the way of startup routines, contents inside `.minio.sys/buckets/.minio.sys` are rather transient and not necessary to be healed.
This commit is contained in:
@@ -640,9 +640,9 @@ func newStorageRESTClient(endpoint Endpoint, healthcheck bool) *storageRESTClien
|
||||
healthClient.ExpectTimeouts = true
|
||||
restClient.HealthCheckFn = func() bool {
|
||||
ctx, cancel := context.WithTimeout(GlobalContext, restClient.HealthCheckTimeout)
|
||||
defer cancel()
|
||||
respBody, err := healthClient.Call(ctx, storageRESTMethodHealth, nil, nil, -1)
|
||||
xhttp.DrainBody(respBody)
|
||||
cancel()
|
||||
return toStorageErr(err) != errDiskNotFound
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user