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

[BACKPORT] Use fixed past base time for Record timestamps #13983

Merged
merged 1 commit into from Oct 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -35,8 +35,14 @@ public abstract class AbstractRecord<V> implements Record<V> {
/**
* Base time to be used for storing time values as diffs (int) rather than full blown epoch based vals (long)
* This allows for a space in seconds, of roughly 68 years.
*
* Reference value (1514764800000) - Monday, January 1, 2018 12:00:00 AM
*
* The fixed time in the past (instead of {@link System#currentTimeMillis()} prevents any
* time discrepancies among nodes, mis-translated as diffs of -1 ie. {@link Record#NOT_AVAILABLE} values.
* (see. https://github.com/hazelcast/hazelcast-enterprise/issues/2527)
*/
public static final long EPOCH_TIME = zeroOutMs(System.currentTimeMillis());
public static final long EPOCH_TIME = zeroOutMs(1514764800000L);

private static final int NUMBER_OF_LONGS = 2;
private static final int NUMBER_OF_INTS = 5;
Expand Down