allow server startup to come online with READ success (#19957)

This commit is contained in:
Harshavardhana 2024-06-19 22:21:31 -07:00 committed by GitHub
parent bce93b5cfa
commit 2825294b7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -2425,7 +2425,6 @@ const (
type HealthOptions struct { type HealthOptions struct {
Maintenance bool Maintenance bool
DeploymentType string DeploymentType string
Startup bool
} }
// HealthResult returns the current state of the system, also // HealthResult returns the current state of the system, also

View File

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