/** * * @return true if KRF files are used on this disk store's oplogs */ boolean couldHaveKrf() { return !isOffline(); }
private void setFirstChild(TreeSet<Oplog> oplogSet, boolean force) { if (parent.isOffline() && !parent.isOfflineCompacting() && !parent.isOfflineModify()) return; if (!oplogSet.isEmpty()) { Oplog first = oplogSet.first(); DirectoryHolder dh = first.getDirectoryHolder(); dirCounter = dh.getArrayIndex(); dirCounter = (++dirCounter) % parent.dirLength; // we want the first child to go in the directory after the directory // used by the existing oplog with the max id. // This fixes bug 41822. } if (force || maxRecoveredOplogId > 0) { setChild(new Oplog(maxRecoveredOplogId + 1, this, getNextDir())); } }
private void setFirstChild(TreeSet<Oplog> oplogSet, boolean force) { if (parent.isOffline() && !parent.isOfflineCompacting()) return; if (!oplogSet.isEmpty()) { Oplog first = oplogSet.first(); DirectoryHolder dh = first.getDirectoryHolder(); dirCounter = dh.getArrayIndex(); dirCounter = (++dirCounter) % parent.dirLength; // we want the first child to go in the directory after the directory // used by the existing oplog with the max id. // This fixes bug 41822. } if (force || maxRecoveredOplogId > 0) { setChild(new Oplog(maxRecoveredOplogId + 1, this, getNextDir())); } }
/** * * @return true if KRF files are used on this disk store's oplogs */ boolean couldHaveKrf() { return !isOffline(); }
private void dumpInfo(PrintStream printStream, String regName) { assert isOffline(); getDiskInitFile().dumpRegionInfo(printStream, regName); } private void dumpPdxTypes(PrintStream printStream) {
final void endAsyncDiskTask() { if (isOffline()) { return; } final GemFireCacheImpl.StaticSystemCallbacks sysCb = GemFireCacheImpl .getInternalProductCallbacks(); if (sysCb != null) { sysCb.endAsyncDiskTask(this); } }
private void dumpMetadata(boolean showBuckets) { assert isOffline(); getDiskInitFile().dumpRegionMetadata(showBuckets); }
private void dumpMetadata(boolean showBuckets) { assert isOffline(); getDiskInitFile().dumpRegionMetadata(showBuckets); }
private void dumpInfo(PrintStream printStream, String regName) { assert isOffline(); getDiskInitFile().dumpRegionInfo(printStream, regName); }
public void addRegionOwnedDiskStore(DiskStoreImpl dsi) { this.regionOwnedDiskStores.put(dsi.getName(), dsi); if (!dsi.isOffline()) { getDiskStoreMonitor().addDiskStore(dsi); } }
public void addDiskStore(DiskStoreImpl dsi) { this.diskStores.put(dsi.getName(), dsi); if (!dsi.isOffline()) { getDiskStoreMonitor().addDiskStore(dsi); } }
@Override public boolean persistIndexes(DiskStoreImpl ds) { return (!ds.isUsedForInternalUse() && !ds.isOffline() && Misc .getMemStoreBooting().isPersistIndexes()); }
@Override public boolean persistIndexes(DiskStoreImpl ds) { return (!ds.isUsedForInternalUse() && !ds.isOffline() && Misc .getMemStoreBooting().isPersistIndexes()); }
@Override public boolean persistIndexes(DiskStoreImpl ds) { return (!ds.isUsedForInternalUse() && !ds.isOffline() && Misc .getMemStoreBooting().isPersistIndexes()); }
private Object deserializeKey(byte[] keyBytes, final Version version, final ByteArrayDataInput in) { if (!getParent().isOffline() || !PdxWriterImpl.isPdx(keyBytes)) { return EntryEventImpl.deserialize(keyBytes, version, in); } else { return new RawByteKey(keyBytes); } }
private Object deserializeKey(byte[] keyBytes, final Version version, final ByteArrayDataInput in) { if (!getParent().isOffline() || !PdxWriterImpl.isPdx(keyBytes)) { return EntryEventImpl.deserialize(keyBytes, version, in); } else { return new RawByteKey(keyBytes); } }
void addDiskRegion(DiskRegion dr) { if (dr.isBackup()) { PersistentOplogSet oplogSet = getPersistentOplogSet(dr); if(!isOffline()) { oplogSet.initChild(); } DiskRegion old = this.drMap.putIfAbsent(dr.getId(), dr); if (old != null) { throw new IllegalStateException("DiskRegion already exists with id " + dr.getId() + " and name " + old.getName()); } getDiskInitFile().createRegion(dr); } else { this.overflowMap.add(dr); } if (getOwnedByRegion()) { this.ownCount.incrementAndGet(); } }
@Override public void waitForAsyncIndexRecovery(DiskStoreImpl dsi) { if (dsi.isOffline()) { return; } final GemFireStore memStore = Misc.getMemStoreBooting(); if (GemFireXDUtils.TracePersistIndex) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_INDEX, "RegionEntryUtils#waitForAsyncIndexRecovery: " + "waiting for index creation for " + dsi); } memStore.waitForIndexLoadBegin(-1); if (GemFireXDUtils.TracePersistIndex) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_INDEX, "RegionEntryUtils#waitForAsyncIndexRecovery: " + "done wait for index creation for " + dsi); } }
@Override public void waitForAsyncIndexRecovery(DiskStoreImpl dsi) { // don't wait for DataDictionary if (dsi.isUsedForInternalUse() || dsi.isOffline()) { return; } final GemFireStore memStore = Misc.getMemStoreBooting(); if (GemFireXDUtils.TracePersistIndex) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_INDEX, "RegionEntryUtils#waitForAsyncIndexRecovery: " + "waiting for index creation for " + dsi); } memStore.waitForIndexLoadBegin(-1); if (GemFireXDUtils.TracePersistIndex) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_INDEX, "RegionEntryUtils#waitForAsyncIndexRecovery: " + "done wait for index creation for " + dsi); } }
@Override public void waitForAsyncIndexRecovery(DiskStoreImpl dsi) { // don't wait for DataDictionary if (dsi.isUsedForInternalUse() || dsi.isOffline()) { return; } final GemFireStore memStore = Misc.getMemStoreBooting(); if (GemFireXDUtils.TracePersistIndex) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_INDEX, "RegionEntryUtils#waitForAsyncIndexRecovery: " + "waiting for index creation for " + dsi); } memStore.waitForIndexLoadBegin(-1); if (GemFireXDUtils.TracePersistIndex) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_INDEX, "RegionEntryUtils#waitForAsyncIndexRecovery: " + "done wait for index creation for " + dsi); } }