Oplog removeOplog(long id, boolean deleting, Oplog olgToAddToDrfOnly) {
    Oplog oplog;
    boolean drfOnly = false;
    boolean inactive = false;

    synchronized (getOplogIdToOplog()) {
      Long key = id;
      oplog = getOplogIdToOplog().remove(key);
      if (oplog == null) {
        oplog = inactiveOplogs.remove(key);
        if (oplog != null) {
          if (oplog.isRAFOpen()) {
            inactiveOpenCount.decrementAndGet();
          }
          inactive = true;
        } else {
          oplog = drfOnlyOplogs.remove(key);
          if (oplog != null) {
            drfOnly = true;
          }
        }
      }

      if (olgToAddToDrfOnly != null) {
        addDrf(olgToAddToDrfOnly);
      }
    }

    if (oplog != null) {
      if (!drfOnly) {
        if (inactive) {
          parent.getStats().incInactiveOplogs(-1);
        } else {
          parent.getStats().incCompactableOplogs(-1);
        }
      }

      if (!deleting && !oplog.isOplogEmpty()) {
        // we are removing an oplog whose files are not deleted
        parent.undeletedOplogSize.addAndGet(oplog.getOplogSize());
      }
    }
    return oplog;
  }
Removes the oplog from the map given the oplogId

@param id id of the oplog to be removed from the list
@return oplog Oplog which has been removed
geode-core/src/main/java/org/apache/geode/internal/cache/PersistentOplogSet.java