-
Notifications
You must be signed in to change notification settings - Fork 188
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
Failover when we miss Mesos Master heartbeats. #1853
Conversation
@@ -329,7 +339,8 @@ public void error(String message) { | |||
|
|||
@Override | |||
public void heartbeat(Event event) { | |||
LOG.debug("Heartbeat from mesos"); | |||
long now = System.currentTimeMillis(); | |||
LOG.debug("Heartbeat from mesos. Delta since last heartbeat is {}ms", now - lastHeartbeatTime.getAndSet(now)); |
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.
seems like a weird thing to have the getAndSet inside the debug line. I know it gets evaluated the same, but I had to read this a few times to convince myself it would always be hit
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.
Aye, it'll get eval'd before (and regardless of whether) the logger actually tries to write the line. Agreed that it's unnecessarily dense though, I can split this out for clarity.
🚢 |
No description provided.