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: Fixes the single host lag reporting case #4494

Merged
merged 4 commits into from
Feb 10, 2020

Conversation

AlanConfluent
Copy link
Member

Description

Currently, when a single host exists, lag doesn't get reported. This ensures lag always gets reported. Also changes the default to not filter if there is no lag data.

Testing done

Describe the testing strategy. Unit and integration tests are expected for any behavior changes.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@AlanConfluent AlanConfluent requested a review from a team as a code owner February 8, 2020 03:44
Copy link
Contributor

@vinothchandar vinothchandar left a comment

Choose a reason for hiding this comment

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

This looks good to me overall, in the context of the issue. Another pair of eyes from @vpapavas on the review and we can add a test before merging?

@vpapavas
Copy link
Member

Thank you @AlanConfluent! Does it make sense to add a functional test with a single server that catches this corner-case (and maybe others we have not found yet?)

Copy link
Contributor

@vinothchandar vinothchandar left a comment

Choose a reason for hiding this comment

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

Changes in this PR itself sg to me. +1 to @vpapavas on adding more cases to functional test. Wondering if that can happen in another PR though..

Also could you share any local testing you may have done around this?

@@ -223,6 +223,9 @@ private void processHeartbeats(final long windowStart, final long windowEnd) {
}
return status;
});
for (HostStatusListener listener : hostStatusListeners) {
listener.onHostStatusUpdated(getHostsStatus());
Copy link
Contributor

Choose a reason for hiding this comment

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

any exception handling needed here to ensure we don't stop notifying if one of the callbacks throw an error?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Factored out notification to a method where I now catch and log any errors.

@AlanConfluent
Copy link
Member Author

Changes in this PR itself sg to me. +1 to @vpapavas on adding more cases to functional test. Wondering if that can happen in another PR though..

Also could you share any local testing you may have done around this?

I have a functional test I'm working on. Won't take long, but can make it another PR so we're not blocked on it.

I tested by modifying one of my functional tests to have one host and verified that it reported lag. I also built the server and ran it locally with a single host and then looked at the clusterStatus as I produced messages to a topic and saw that the lag increased.

@AlanConfluent AlanConfluent merged commit 6b8bc2a into confluentinc:master Feb 10, 2020
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.

3 participants