mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Fix the prev commit 02b2c90 for ChronicleSet
This commit is contained in:
+2
-2
@@ -71,9 +71,9 @@ public final class DefaultEventualConsistencyStrategy {
|
||||
// lost. (This is almost a theoretical situation.) In this case, give advantage to fresh
|
||||
// entry updates to the "new" node. Entries with the same id and timestamp, bootstrapped
|
||||
// "back" from other nodes in the system, are discarded on this new node (this is the
|
||||
// of the condition originIdentifier == thisReplica.identifier()). But those new updates
|
||||
// of the condition originIdentifier == currentNodeIdentifier). But those new updates
|
||||
// should win on other nodes.
|
||||
return originIdentifier == ((Replica) context.hash()).identifier() ? DISCARD : ACCEPT;
|
||||
return originIdentifier == context.currentNodeIdentifier() ? DISCARD : ACCEPT;
|
||||
}
|
||||
|
||||
private DefaultEventualConsistencyStrategy() {}
|
||||
|
||||
@@ -29,4 +29,6 @@ public interface RemoteOperationContext<K> extends HashContext<K> {
|
||||
byte remoteIdentifier();
|
||||
|
||||
long remoteTimestamp();
|
||||
|
||||
byte currentNodeIdentifier();
|
||||
}
|
||||
|
||||
@@ -77,4 +77,9 @@ public abstract class ReplicationUpdate<K> implements RemoteOperationContext<K>
|
||||
checkOnEachPublicOperation.checkOnEachPublicOperation();
|
||||
return innerRemoteIdentifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte currentNodeIdentifier() {
|
||||
return mh.m().identifier();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user