public void basicDestroy(DiskRegion dr) { ArrayList<Oplog> oplogsToDestroy = new ArrayList<Oplog>(); synchronized (this.oplogIdToOplog) { for (Oplog oplog : this.oplogIdToOplog.values()) { oplogsToDestroy.add(oplog); } for (Oplog oplog : this.inactiveOplogs.values()) { oplogsToDestroy.add(oplog); } for (Oplog oplog : this.drfOnlyOplogs.values()) { oplogsToDestroy.add(oplog); } { Oplog child = getChild(); if (child != null) { oplogsToDestroy.add(child); } } } for (Oplog oplog : oplogsToDestroy) { oplog.destroy(dr); } }
public void basicDestroy(DiskRegion dr) { ArrayList<Oplog> oplogsToDestroy = new ArrayList<Oplog>(); synchronized (this.oplogIdToOplog) { for (Oplog oplog : this.oplogIdToOplog.values()) { oplogsToDestroy.add(oplog); } for (Oplog oplog : this.inactiveOplogs.values()) { oplogsToDestroy.add(oplog); } for (Oplog oplog : this.drfOnlyOplogs.values()) { oplogsToDestroy.add(oplog); } { Oplog child = getChild(); if (child != null) { oplogsToDestroy.add(child); } } } for (Oplog oplog : oplogsToDestroy) { oplog.destroy(dr); } }
private void handleEmptyAndOldest(boolean calledByCompactor) { if (!calledByCompactor && logger.isDebugEnabled()) { logger.debug("Deleting oplog early because it is empty. It is for disk store {} and has oplog#{}", getParent().getName(), oplogId); } destroy(); getOplogSet().destroyOldestReadyToCompact(); }
public void destroyAllOplogs() { // get a snapshot to prevent CME for (Oplog oplog : getAllOplogs()) { if (oplog != null) { // logger.info(LocalizedStrings.DEBUG, "DEBUG destroying oplog=" + // oplog.getOplogId()); oplog.destroy(); removeOplog(oplog.getOplogId()); } } }
public void destroyAllOplogs() { // get a snapshot to prevent CME for (Oplog oplog : getAllOplogs()) { if (oplog != null) { oplog.destroy(); removeOplog(oplog.getOplogId()); } } }
public void offlineCompact() { if (getChild() != null) { // check active oplog and if it is empty delete it getChild().krfClose(true, false); if (getChild().isOplogEmpty()) { getChild().destroy(); } } { // remove any oplogs that only have a drf to fix bug 42036 ArrayList<Oplog> toDestroy = new ArrayList<Oplog>(); synchronized (this.oplogIdToOplog) { Iterator<Oplog> it = this.oplogIdToOplog.values().iterator(); while (it.hasNext()) { Oplog n = it.next(); if (n.isDrfOnly()) { toDestroy.add(n); } } } for (Oplog oplog : toDestroy) { oplog.destroy(); } destroyOldestReadyToCompact(); } }
public void offlineCompact() { if (getChild() != null) { // check active oplog and if it is empty delete it getChild().krfClose(); if (getChild().isOplogEmpty()) { getChild().destroy(); } } { // remove any oplogs that only have a drf to fix bug 42036 ArrayList<Oplog> toDestroy = new ArrayList<Oplog>(); synchronized (this.oplogIdToOplog) { Iterator<Oplog> it = this.oplogIdToOplog.values().iterator(); while (it.hasNext()) { Oplog n = it.next(); if (n.isDrfOnly()) { toDestroy.add(n); } } } for (Oplog oplog : toDestroy) { oplog.destroy(); } destroyOldestReadyToCompact(); } }
private void handleEmptyAndOldest(boolean calledByCompactor) { if (!calledByCompactor) { if (logger.infoEnabled()) { logger.info(LocalizedStrings.DEBUG, "Deleting oplog early because it is empty. It is for disk store " + getParent().getName() + " and has oplog#" + oplogId); } } destroy(); getOplogSet().destroyOldestReadyToCompact(); } private void handleEmpty(boolean calledByCompactor) {
if (isOplogEmpty()) { this.deleted.set(false); destroy();
if (isOplogEmpty()) { this.deleted.set(false); destroy();