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 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(); } }