avoid waiting for quorum health while debugging (#19955)

This commit is contained in:
Harshavardhana
2024-06-19 10:12:20 -07:00
committed by GitHub
parent e5335450a4
commit 7a4b250c8b
3 changed files with 13 additions and 19 deletions

View File

@@ -923,6 +923,10 @@ func serverMain(ctx *cli.Context) {
bootstrapTrace("waitForQuorum", func() {
result := newObject.Health(context.Background(), HealthOptions{Startup: true})
for !result.Healthy {
if debugNoExit {
logger.Info("Not waiting for quorum since we are debugging.. possible cause unhealthy sets (%s)", result)
break
}
d := time.Duration(r.Float64() * float64(time.Second))
logger.Info("Waiting for quorum healthcheck to succeed.. possible cause unhealthy sets (%s), retrying in %s", result, d)
time.Sleep(d)