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

[Trivial] Modify health check API #3491

Closed
wants to merge 2 commits into from

Conversation

HowardHinnant
Copy link
Contributor

#3486

* Fixes XRPLF#3486
* load factor computation normalized by load_base.
* last validated ledger age set to -1 while syncing.
* Return status changed:
*    healthy  -> ok
*    warning  -> service_unavailable
*    critical -> internal_server_error
Copy link
Collaborator

@mDuo13 mDuo13 left a comment

Choose a reason for hiding this comment

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

Tentatively looks good, but I'd like to test it out just to be sure

Copy link
Collaborator

@mDuo13 mDuo13 left a comment

Choose a reason for hiding this comment

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

Looks like something's weird with the JSON serialization in the "healthy" case. I would prefer the body to take this format (indentation notwithstanding):

{
    "info": {}
}

I would also accept this:

{}

Instead, it's this:

null

Technically null is a valid JSON document, but it's pretty uncommon for a JSON document to consist of just that. So I'd prefer it to be changed to one of the above.

(I don't think this is a new issue introduced by this PR, but this PR revealed the issue since finally my server reports itself as fully healthy)

Copy link
Collaborator

@mDuo13 mDuo13 left a comment

Choose a reason for hiding this comment

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

Tested the update and it works great! 👍

@HowardHinnant HowardHinnant added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Jul 8, 2020
@manojsdoshi manojsdoshi mentioned this pull request Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

load_factor appears to be using wrong units in health check (Version: 1.6.0-b8)
2 participants