Skip to content

Conversation

@baconmania
Copy link
Contributor

No description provided.

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.

3 participants