-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
Generate changelog in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, a few nits and would like a test for multiple clients though
changelog/@unreleased/pr-4974.v2.yml
Outdated
@@ -0,0 +1,6 @@ | |||
type: improvement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: fix
leader-election-impl/src/main/java/com/palantir/leader/health/LeaderElectionHealthCheck.java
Show resolved
Hide resolved
private static final double MAX_ALLOWED_LAST_5_MINUTE_RATE = 0.016; | ||
private static final double MAX_ALLOWED_LAST_5_MINUTE_RATE = 0.015; | ||
private final ConcurrentMap<Client, LeaderElectionServiceMetrics> clientWiseMetrics | ||
= new ConcurrentHashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: one line, and extra newline
|
||
private final LeaderElectionServiceMetrics leaderElectionServiceMetrics; | ||
public void registerClient(Client namespace, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: one line
private final LeaderElectionHealthCheck leaderElectionHealthCheck = | ||
new LeaderElectionHealthCheck(leaderElectionServiceMetrics); | ||
private final LeaderElectionHealthCheck leaderElectionHealthCheck = new LeaderElectionHealthCheck(); | ||
private static final Client CLIENT = Client.of("abc"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test with multiple clients
LGTM! |
Released 0.245.2 |
Goals (and why):
Fix bug with leader election rate health check. The health check should be analyzing the metrics per client.
Implementation Description (bullets):
Register client wise metrics to leader election rate health check.
Leader election health check performs analysis on the sum of rates of all clients
Testing (What was existing testing like? What have you done to improve it?):
Tested on internal testing environment
Concerns (what feedback would you like?):
Does the wiring make sense?
Where should we start reviewing?:
LeaderElectionHealthCheck.java, TimeLockAgent.java
Priority (whenever / two weeks / yesterday):
As soon as possible 🔥