private boolean overwritingOldTombstone(InternalRegion region, VersionStamp stamp, VersionTag tag, StringBuilder verbose) { // Tombstone GC does not use locking to stop operations when old tombstones // are being removed. Because of this we might get an operation that was applied // in another VM that has just reaped a tombstone and is now using a reset // entry version number. Because of this we check the timestamp on the current // local entry and see if it is old enough to have expired. If this is the case // we accept the change and allow the tag to be recorded long stampTime = stamp.getVersionTimeStamp(); if (isExpiredTombstone(region, stampTime, this.isTombstone())) { // no local change since the tombstone would have timed out - accept the change if (verbose != null) { verbose.append(" - accepting because local timestamp is old"); } return true; } else { return false; } }
byte[] serializeVersionTag(VersionStamp stamp) throws IOException { int entryVersion = stamp.getEntryVersion(); long regionVersion = stamp.getRegionVersion(); VersionSource versionMember = stamp.getMemberID(); long timestamp = stamp.getVersionTimeStamp(); int dsId = stamp.getDistributedSystemId(); return serializeVersionTag(entryVersion, regionVersion, versionMember, timestamp, dsId); }
int tagVersion = tag.getEntryVersion(); if (stamp.getVersionTimeStamp() != 0) { // new entries have no timestamp } else if (stampVersion > tagVersion) { if (overwritingOldTombstone(region, stamp, tag, verbose) && tag.getVersionTimeStamp() > stamp.getVersionTimeStamp()) { apply = true; } else { && tag.getVersionTimeStamp() > stamp.getVersionTimeStamp()) {
&& tag.getVersionTimeStamp() > stamp.getVersionTimeStamp()) { stamp.setVersionTimeStamp(tag.getVersionTimeStamp()); tag.setTimeStampApplied(true);
private VersionTag getVersionTagFromStamp(VersionStamp stamp) { VersionTag tag = VersionTag.create(stamp.getMemberID()); tag.setEntryVersion(stamp.getEntryVersion()); tag.setRegionVersion(stamp.getRegionVersion()); tag.setVersionTimeStamp(stamp.getVersionTimeStamp()); tag.setDistributedSystemId(stamp.getDistributedSystemId()); return tag; }
long stampTime = getVersionStamp().getVersionTimeStamp(); long tagTime = tag.getVersionTimeStamp(); int stampDsid = getVersionStamp().getDistributedSystemId();
.append(stamp.asVersionTag()).append(", tag=").append(tag); long stampTime = stamp.getVersionTimeStamp(); long tagTime = tag.getVersionTimeStamp(); if (stampTime > 0 && (tagTime > stampTime || (tagTime == stampTime
if (time <= stamp.getVersionTimeStamp() && dsid != tag.getDistributedSystemId()) { time = stamp.getVersionTimeStamp() + 1;