long recoverCrf(OplogEntryIdSet deletedIds, boolean recoverValues, boolean recoverValuesSync,
      boolean alreadyRecoveredOnce, Set<Oplog> oplogsNeedingValueRecovery, boolean latestOplog) {
    // crf might not exist; but drf always will
    diskFile = new File(drf.f.getParentFile(),
        oplogSet.getPrefix() + getParent().getName() + "_" + oplogId);

    File crfFile = crf.f;
    if (crfFile == null) {
      haveRecoveredCrf = true;
      return 0L;
    }

    lockCompactor();
    kvMap = new OplogEntryIdMap();
    skippedKeyBytes = new OplogEntryIdMap();
    try {
      if (haveRecoveredCrf && isDeleted()) {
        return 0; // do this check while holding lock
      }
      if (!haveRecoveredCrf) {
        haveRecoveredCrf = true;
      }

      long byteCount;
      // if we have a KRF then read it and delay reading the CRF.
      // Unless we are in synchronous recovery mode
      if (!readKrf(deletedIds, recoverValues, recoverValuesSync, oplogsNeedingValueRecovery,
          latestOplog)) {
        logger.info("Recovering {} {} for disk store {}.",
            new Object[] {toString(), crfFile.getAbsolutePath(), getParent().getName()});
        byteCount = readCrf(deletedIds, recoverValues, latestOplog);
      } else {
        byteCount = crf.f.length();
      }
      if (!isPhase2()) {
        if (getParent().isOfflineCompacting()) {
          getParent().incLiveEntryCount(getRecoveryMap().size());
        }
        long tc = totalCount.get();
        long tlc = totalLiveCount.get();
        if (getParent().isValidating() && tlc >= 0
            && tc > tlc) {
          getParent().incDeadRecordCount(tc - tlc);
        }
        getParent().incDeadRecordCount(getRecordsSkipped());
      }
      if (getParent().isOfflineCompacting()) {
        offlineCompact(deletedIds, latestOplog);
      }
      if (!alreadyRecoveredOnce) {
        setRecoveredCrfSize(byteCount);
        dirHolder.incrementTotalOplogSize(byteCount);
      }
      if (getParent().isOfflineCompacting()) {
        if (isOplogEmpty()) {
          deleted.set(false);
          destroy();
        }
      }
      return byteCount;
    } finally {
      kvMap = null;
      skippedKeyBytes = null;
      unlockCompactor();
    }
  }
Recovers one oplog

@param latestOplog - true if this oplog is the latest oplog in the disk store.
geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java