mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Start setting lastModifiedTime and fixed bootstrapping; clarified some test @Ignores
This commit is contained in:
@@ -185,7 +185,7 @@ public class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? sup
|
||||
assignedModIterBitSetSizeInBytes();
|
||||
}
|
||||
|
||||
void setLastModificationTime(byte identifier, long timestamp) {
|
||||
public void setLastModificationTime(byte identifier, long timestamp) {
|
||||
final long offset = identifier * 8L;
|
||||
|
||||
// purposely not volatile as this will impact performance,
|
||||
@@ -598,15 +598,23 @@ public class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? sup
|
||||
iterationContext()) {
|
||||
// iterate over all the segments and mark bit in the modification iterator
|
||||
// that correspond to entries with an older timestamp
|
||||
boolean debugEnabled = LOG.isDebugEnabled();
|
||||
for (int i = 0; i < actualSegments; i++) {
|
||||
final int segmentIndex = i;
|
||||
c.initTheSegmentIndex(segmentIndex);
|
||||
c.forEachReplicableEntry(entry -> {
|
||||
LOG.debug("Bootstrap entry: id {}, key {}, value {}", localIdentifier,
|
||||
c.key(), c.value());
|
||||
if (debugEnabled) {
|
||||
LOG.debug("Bootstrap entry: id {}, key {}, value {}", localIdentifier,
|
||||
c.key(), c.value());
|
||||
}
|
||||
MapReplicableEntry re = (MapReplicableEntry) entry;
|
||||
assert re.originTimestamp() > 0L;
|
||||
if (re.originIdentifier() >= fromTimeStamp &&
|
||||
if (debugEnabled) {
|
||||
LOG.debug("Bootstrap decision: bs ts: {}, entry ts: {}, entry id: {}, " +
|
||||
"local id: {}", fromTimeStamp, re.originTimestamp(),
|
||||
re.originIdentifier(), localIdentifier);
|
||||
}
|
||||
if (re.originTimestamp() >= fromTimeStamp &&
|
||||
(!bootstrapOnlyLocalEntries ||
|
||||
re.originIdentifier() == localIdentifier)) {
|
||||
raiseChange(segmentIndex, c.pos());
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1062
-1062
File diff suppressed because it is too large
Load Diff
+1704
-1696
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user