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

Failover when we miss Mesos Master heartbeats. #1853

Merged
merged 6 commits into from
Sep 28, 2018

Conversation

baconmania
Copy link
Contributor

No description provided.

@@ -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));
Copy link
Member

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

Copy link
Contributor Author

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.

@ssalinas
Copy link
Member

🚢

@ssalinas ssalinas added the hs_qa label Sep 26, 2018
@ssalinas ssalinas merged commit 1c97a8b into master Sep 28, 2018
@ssalinas ssalinas deleted the failover-on-no-heartbeat branch September 28, 2018 11:13
@ssalinas ssalinas added this to the 0.22.0 milestone Nov 6, 2018
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.

2 participants