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

NRG: Log healthy status when no longer falling behind #4995

Merged
merged 1 commit into from Jan 24, 2024

Conversation

neilalexander
Copy link
Member

This makes it clear in the logs that the falling behind condition cleared up.

Signed-off-by: Neil Twigg neil@nats.io

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander requested a review from a team as a code owner January 24, 2024 17:41
// Make sure we are the leader or we know we have heard from the leader recently.
if n.State() == Leader {
clearBehindState()
Copy link
Member

Choose a reason for hiding this comment

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

This not only applicable to leaders no?

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 put this here just to cover the case of if you became leader in that time, to ensure the behind state gets cleared.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha..

@derekcollison derekcollison self-requested a review January 24, 2024 22:32
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit 2c9fe52 into main Jan 24, 2024
4 checks passed
@derekcollison derekcollison deleted the neil/fallingbehind branch January 24, 2024 22:32
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.

None yet

3 participants