@Override public void update(DiskEntry de) { if(pendingKrfTags != null && de.getVersionStamp() != null) { //Remember the version tag of the entry as it was written to the crf. pendingKrfTags.put(de, new CompactVersionHolder(de.getVersionStamp())); } }
@Override public void update(DiskEntry de) { if (pendingKrfTags != null && de.getVersionStamp() != null) { // Remember the version tag of the entry as it was written to the crf. pendingKrfTags.put(de, new CompactVersionHolder(de.getVersionStamp())); } }
@Override public void addLive(DiskEntry de) { synchronized(liveEntries) { this.liveEntries.insert(de); if(pendingKrfTags != null && de.getVersionStamp() != null) { //Remember the version tag of the entry as it was written to the crf. pendingKrfTags.put(de, new CompactVersionHolder(de.getVersionStamp())); } } }
@Override public void replaceLive(DiskEntry old, DiskEntry de) { synchronized (liveEntries) { this.liveEntries.replace(old, de); if (pendingKrfTags != null && de.getVersionStamp() != null) { // Remember the version tag of the entry as it was written to the crf. pendingKrfTags.remove(old); pendingKrfTags.put(de, new CompactVersionHolder(de.getVersionStamp())); } } }
@Override public void addLive(DiskEntry de) { synchronized (liveEntries) { this.liveEntries.insert(de); if (pendingKrfTags != null && de.getVersionStamp() != null) { // Remember the version tag of the entry as it was written to the crf. pendingKrfTags.put(de, new CompactVersionHolder(de.getVersionStamp())); } } }
@Override public void replaceLive(DiskEntry old, DiskEntry de) { synchronized (liveEntries) { this.liveEntries.replace(old, de); if (pendingKrfTags != null && de.getVersionStamp() != null) { // Remember the version tag of the entry as it was written to the crf. pendingKrfTags.remove(old); pendingKrfTags.put(de, new CompactVersionHolder(de.getVersionStamp())); } } }
private void initVersionsBytes(DiskEntry entry) throws IOException { // persist entry version, region version and memberId // The versions in entry are initialized to 0. So we will not persist the // 3 // types of data if region version is 0. // TODO: This method will be called 2 times, one for persisting into crf // another for persisting into krf, since we did not save the byte arrary // for the verstion tag. VersionStamp stamp = entry.getVersionStamp(); if (EntryBits.isWithVersions(this.userBits)) { assert (stamp != null); this.versionsBytes = serializeVersionTag(stamp); this.size += this.versionsBytes.length; } }
private void initVersionsBytes(DiskEntry entry) throws IOException { // persist entry version, region version and memberId // The versions in entry are initialized to 0. So we will not persist the 3 // types of data if region version is 0. // TODO: This method will be called 2 times, one for persisting into crf // another for persisting into krf, since we did not save the byte arrary // for the verstion tag. if (EntryBits.isWithVersions(this.userBits)) { VersionStamp stamp = entry.getVersionStamp(); assert (stamp != null); this.versionsBytes = serializeVersionTag(stamp); this.size += this.versionsBytes.length; } else { // persist last modified time for no-versions case this.userBits = EntryBits.setHasLastModifiedTime(this.userBits); initLastModifiedTime(entry.getLastModified()); } }
if (EntryBits.isWithVersions(userBits) && de.getVersionStamp() != null) { tag = de.getVersionStamp().asVersionTag(); } else if (de.getVersionStamp() != null) { throw new AssertionError("No version bits on entry we're writing to the krf " + de);
if (EntryBits.isWithVersions(userBits) && de.getVersionStamp()!=null) { tag = de.getVersionStamp().asVersionTag(); } else if(de.getVersionStamp() != null) { throw new AssertionError("No version bits on entry we're writing to the krf " + de);
byte userBits = calcUserBits(vw); VersionStamp vs = entry.getVersionStamp(); if (vs != null) { if (vs.getMemberID() == null) {
private boolean shouldClear(LocalRegion r, RegionVersionVector rvv, AsyncDiskEntry ade) { if (ade.region != r) { return false; } // If no RVV, remove all of the async items for this region. if (rvv == null) { return true; } // If we are clearing based on an RVV, only remove // entries contained in the RVV if (ade.versionOnly) { return rvv.contains(ade.tag.getMemberID(), ade.tag.getRegionVersion()); } else { VersionStamp stamp = ade.de.getVersionStamp(); VersionSource member = stamp.getMemberID(); if (member == null) { // For overflow only regions, the version member may be null // because that represents the local internal distributed member member = r.getVersionMember(); } return rvv.contains(member, stamp.getRegionVersion()); } }
private boolean shouldClear(LocalRegion r, RegionVersionVector rvv, AsyncDiskEntry ade) { if (ade.region != r) { return false; } // If no RVV, remove all of the async items for this region. if (rvv == null) { return true; } // If we are clearing based on an RVV, only remove // entries contained in the RVV if (ade.versionOnly) { return rvv.contains(ade.tag.getMemberID(), ade.tag.getRegionVersion()); } else { VersionStamp stamp = ade.de.getVersionStamp(); VersionSource member = stamp.getMemberID(); if (member == null) { // For overflow only regions, the version member may be null // because that represents the local internal distributed member member = r.getVersionMember(); } return rvv.contains(member, stamp.getRegionVersion()); } }
if (entry.getVersionStamp() != null) { if (entry.getVersionStamp().getMemberID() == null) { throw new AssertionError("Version stamp should have a member at this point for entry " + entry);
if (entry.getVersionStamp()!=null) { if(entry.getVersionStamp().getMemberID() == null) { throw new AssertionError("Version stamp should have a member at this point for entry " + entry);
if (entry.getVersionStamp() != null) { if (entry.getVersionStamp().getMemberID() == null) { throw new AssertionError("Version stamp should have a member at this point for entry " + entry);
byte userBits = calcUserBits(value); if (entry.getVersionStamp()!=null) { if(entry.getVersionStamp().getMemberID() == null) { throw new AssertionError("Version stamp should have a member at this point for entry " + entry);
"replacing incompatible entry key = {} old = {} new = {} oldDiskId = {} new diskId = {} tag = {} in child oplog #{}", old.getKey(), System.identityHashCode(old), System.identityHashCode(repl), old.getDiskId(), repl.getDiskId(), old .getVersionStamp(), this.getOplogId());
+ " old diskId = " + old.getDiskId() + " new diskId = " + repl.getDiskId() + " tag = " + old.getVersionStamp() + " in child oplog #"+this.getOplogId());
VersionStamp stamp = entry.getVersionStamp(); if(tag != null && stamp != null && (stamp.getMemberID() != tag.getMemberID()