Replication updates with local identifier shouldn't use the same timestamp, because this allows two different updates which replace each other on different nodes, and don't converge. Extend default TimeProvider precision to nanoseconds, to exclude possibility of 'microsecond overflow' on frequent changes to the same entry

This commit is contained in:
leventov
2015-12-26 17:28:35 +03:00
parent 0ead52335b
commit 1743f1c694
5 changed files with 14 additions and 19 deletions
@@ -184,7 +184,7 @@ public final class ChronicleMapBuilder<K, V> implements
private boolean removeReturnsNull = false;
// replication
private TimeProvider timeProvider = MicrosecondPrecisionSystemTimeProvider.instance();
private TimeProvider timeProvider = NanosecondPrecisionSystemTimeProvider.instance();
/**
* Default timeout is 1 minute. Even loopback tests converge often in the course of seconds,
* let alone WAN replication over many nodes might take tens of seconds.