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

feat: fail the health check after SYNC_LBHEARTBEAT_TTL elapses #1337

Merged
merged 2 commits into from
Jun 23, 2022

Conversation

pjenvey
Copy link
Member

@pjenvey pjenvey commented Jun 10, 2022

Issue(s)

Closes #1330

@pjenvey pjenvey requested a review from a team June 10, 2022 23:18
Copy link
Contributor

@ethowitz ethowitz left a comment

Choose a reason for hiding this comment

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

Looks good! Just one nit

pub lbheartbeat_ttl: Option<u32>,
/// Percentage of `lbheartbeat_ttl` time to "jitter" (adds additional,
/// randomized time)
pub lbheartbeat_ttl_jitter: u32,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should this be Option<u32> since lbheartbeat_ttl is an Option<u32>? Also, I don't feel strongly about this, but I'm wondering if it would be clearer to store the jitter as f32 directly since it's a percentage

Copy link
Member Author

Choose a reason for hiding this comment

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

I somewhat followed contile's jitter setting here, it's also an integer and there's no need to support fractional percent values. It sets a default so no Option either -- I'm guessing SRE won't explicitly set a jitter (contile hasn't, still using the default) but they still have the option if necessary.

Whereas the heartbeat_ttl setting also toggles this on or off so deserves an Option.

@pjenvey pjenvey merged commit a72912b into master Jun 23, 2022
@pjenvey pjenvey deleted the feat/1330 branch June 23, 2022 06:40
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.

Support failing the lbheartbeat check after an elapsed time
2 participants