hazelcast/hazelcast — pull request #4226 by cszmajda (2014-12-04 09:26:02+00:00)
Title: In the heartbeat algorithm, compensate for any abrupt jumps forward in the system clock.

In the heartbeat algorithm, compensate for any abrupt jumps forward in the system clock.
This can sometimes be an issue in virtualized environments if time synchronization between
the host OS and guest OS is misconfigured.

The effect of a large clock jump on some cluster node(s) but not others was that some nodes
were spuriously kicked out of the cluster. This now no longer happens due merely to system clock
jumps (but, of course, continues to happen if heartbeats are repeatedly dropped, as before).

In addition, fix the `clusterTimeDiff` calculation so that system clocks drifting in any
direction do not cause spurious timeouts. Previously, `clusterTimeDiff` would converge
to zero, so that converging clocks were compensated but not diverging clocks.

Finally, include `cluster.timeDiff` in the `HealthMonitor` logging.