private void addInactive(Oplog oplog, boolean reopen) {
    Long key = oplog.getOplogId();
    List<Oplog> openlist = null;
    synchronized (getOplogIdToOplog()) {

      boolean isInactive = true;
      if (reopen) {
        // It is possible that 'oplog' is compactible instead of inactive. So set isInactive.
        isInactive = inactiveOplogs.get(key) != null;
      } else {
        inactiveOplogs.put(key, oplog);
      }

      if (reopen && isInactive || oplog.isRAFOpen()) {
        if (inactiveOpenCount.incrementAndGet() > DiskStoreImpl.MAX_OPEN_INACTIVE_OPLOGS) {
          openlist = new ArrayList<>();
          for (Oplog inactiveOplog : inactiveOplogs.values()) {
            if (inactiveOplog.isRAFOpen()) {
              // add to my list
              openlist.add(inactiveOplog);
            }
          }
        }
      }
    }

    if (openlist != null) {
      for (Oplog openOplog : openlist) {
        if (openOplog.closeRAF()) {
          if (inactiveOpenCount.decrementAndGet() <= DiskStoreImpl.MAX_OPEN_INACTIVE_OPLOGS) {
            break;
          }
        }
      }
    }

    if (!reopen) {
      parent.getStats().incInactiveOplogs(1);
    }
  }
Destroy all the oplogs that are:

<pre>
1. the oldest (based on smallest oplog id)
2. empty (have no live values)
</pre>
geode-core/src/main/java/org/apache/geode/internal/cache/PersistentOplogSet.java