Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check sp health retry #1411

Closed
wants to merge 1 commit into from
Closed

Conversation

BarryTong65
Copy link
Contributor

@BarryTong65 BarryTong65 commented May 29, 2024

Description

fix: check sp health retry

defaultSPCheckTimeout               = 1 * time.Minute
defaultSPHealthCheckerInterval      = 10 * time.Second
defaultSPHealthCheckerRetryInterval = 1 * time.Second
defaultSPHealthCheckerMaxRetries    = 5

Rationale

N/A

Example

add an example CLI or API response...

Changes

Notable changes:

  • fix: check sp health retry

Potential Impacts

  • N/A

@BarryTong65 BarryTong65 force-pushed the fix-sp-health-retry branch 3 times, most recently from 0aa908a to 8c3df84 Compare June 3, 2024 02:06
log.CtxErrorw(context.Background(), "failed to check sp healthy", "sp", sp, "http_status_code", resp.StatusCode, "resp_body", resp.Body)
return false
if resp.StatusCode == http.StatusOK {
log.CtxInfow(context.Background(), "succeed to check the sp healthy", "sp", sp, "duration", duration)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we put a metric for the duration so that later we can setup monitor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

log.CtxInfow(context.Background(), "succeed to check the sp healthy", "sp", sp, "duration", duration)
return true
} else {
log.CtxErrorw(context.Background(), "failed to check sp healthy", "sp", sp, "http_status_code", resp.StatusCode, "resp_body", resp.Body, "duration", duration)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a failure happens when check sp, let's also put a metric

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@BarryTong65 BarryTong65 force-pushed the fix-sp-health-retry branch from 794d10e to a9ab997 Compare June 3, 2024 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants