private boolean isRecoveryNeeded() { return getDataPolicy().withPersistence() && getDiskRegion().isRecreated(); }
public void run() { Cache cache = getCache(); Region region = cache.getRegion(REGION_NAME); DistributedRegion distributedRegion = (DistributedRegion) region; DiskRegionStats stats = distributedRegion.getDiskRegion().getStats(); if (localRecovery) { assertEquals(1, stats.getLocalInitializations()); assertEquals(0, stats.getRemoteInitializations()); } else { assertEquals(0, stats.getLocalInitializations()); assertEquals(1, stats.getRemoteInitializations()); } } });
private boolean isRecoveryNeeded() { return getDataPolicy().withPersistence() && getDiskRegion().isRecreated(); }
public void run() { Cache cache = getCache(); DistributedRegion region = (DistributedRegion) cache.getRegion(REGION_NAME); DiskRegionStats stats = region.getDiskRegion().getStats(); if(localRecovery) { assertEquals(1, stats.getLocalInitializations()); assertEquals(0, stats.getRemoteInitializations()); } else { assertEquals(0, stats.getLocalInitializations()); assertEquals(1, stats.getRemoteInitializations()); } } });
/** * Get the best iterator for iterating over the contents of this * region. This method will either an iterator that uses hash * ordering from the entry map, or, in the case of an overflow * region, an iterator that iterates over the entries in disk order. */ public Iterator<RegionEntry> getBestIterator(boolean includeValues) { DiskRegion dr = this.getDiskRegion(); if (DiskPage.DISK_PAGE_SIZE > 0 && includeValues && dr != null) { //Wait for the disk region to recover values first. dr.waitForAsyncRecovery(); if(dr.getNumOverflowOnDisk() > 0) { return new DiskSavyIterator(); } } return this.entries.regionEntries().iterator(); }
DiskRegion dskRgn = getDiskRegion(); if (getDiskRegion() != null) { getDiskRegion().clear(this, null);
protected void saveReceivedRVV(RegionVersionVector rvv) { assert rvv != null; // Make sure the RVV is at least as current as // the provider's was when the GII began. This ensures that a // concurrent clear() doesn't prevent the new region's RVV from being // initialized and that any vector entries that are no longer represented // by stamps in the region are not lost if (logger.isTraceEnabled(LogMarker.GII)) { logger.trace(LogMarker.GII, "Applying received version vector {} to {}", rvv.fullToString(), region.getName()); } //TODO - RVV - Our current RVV might reflect some operations //that are concurrent updates. We want to keep those updates. However //it might also reflect things that we recovered from disk that we are going //to remove. We'll need to remove those from the RVV somehow. region.getVersionVector().recordVersions(rvv); if(region.getDataPolicy().withPersistence()) { region.getDiskRegion().writeRVV(region, false); region.getDiskRegion().writeRVVGC(region); } if (logger.isTraceEnabled(LogMarker.GII)) { logger.trace(LogMarker.GII, "version vector is now {}", region.getVersionVector().fullToString()); } }
r.getDiskRegion().writeRVVGC(r);
protected void saveReceivedRVV(RegionVersionVector rvv) { assert rvv != null; // Make sure the RVV is at least as current as // the provider's was when the GII began. This ensures that a // concurrent clear() doesn't prevent the new region's RVV from being // initialized and that any vector entries that are no longer represented // by stamps in the region are not lost if (TRACE_GII) { region.getLogWriterI18n().info(LocalizedStrings.DEBUG, "Applying received version vector "+rvv.fullToString()+ " to " + region.getName()); } //TODO - RVV - Our current RVV might reflect some operations //that are concurrent updates. We want to keep those updates. However //it might also reflect things that we recovered from disk that we are going //to remove. We'll need to remove those from the RVV somehow. region.getVersionVector().recordVersions(rvv, null); if(region.getDataPolicy().withPersistence()) { region.getDiskRegion().writeRVV(region, false); region.getDiskRegion().writeRVVGC(region); } if (TRACE_GII) { region.getLogWriterI18n().info(LocalizedStrings.DEBUG, "version vector is now " + region.getVersionVector().fullToString()); } }
r.getDiskRegion().writeRVVGC(r);
DiskRegion dskRgn = getDiskRegion(); if (getDiskRegion() != null) { getDiskRegion().clear(this, null);
DiskRegion dskRgn = getDiskRegion(); if (dskRgn != null && dskRgn.isBackup()) { dskRgn.finishInitializeOwner(this, giiStatus);
chunkEntries = new InitialImageVersionedEntryList(rgn.concurrencyChecksEnabled, MAX_ENTRIES_PER_CHUNK); final boolean keyRequiresRegionContext = rgn.keyRequiresRegionContext(); DiskRegion dr = rgn.getDiskRegion(); if( dr!=null ){ dr.setClearCountReference();
DiskRegion dskRgn = getDiskRegion(); if (recoverFromDisk) { if (logger.isDebugEnabled()) {
DiskRegion dskRgn = getDiskRegion(); if (dskRgn != null && dskRgn.isBackup()) { dskRgn.finishInitializeOwner(this, giiStatus);
PersistentMemberView storage; if(getDataPolicy().withPersistence()) { storage = getDiskRegion(); diskStats = getDiskRegion().getStats(); } else { storage = new InMemoryPersistentMemberView();
this.concurrencyChecksEnabled, MAX_ENTRIES_PER_CHUNK); final boolean keyRequiresRegionContext = keyRequiresRegionContext(); DiskRegion dr = getDiskRegion(); final Version targetVersion = sender.getVersionObject(); if( dr!=null ){
final DiskRegion dr = this.region.getDiskRegion(); if (dr != null) { dr.setClearCountReference();
PersistentMemberView storage; if(getDataPolicy().withPersistence()) { storage = getDiskRegion(); diskStats = getDiskRegion().getStats(); } else { storage = new InMemoryPersistentMemberView();
DiskRegion dskRgn = getDiskRegion(); if (dskRgn != null && recoverFromDisk) { persistentId = dskRgn.getMyPersistentID();