private BytesAndBits attemptGet(DiskRegionView dr, long offsetInOplog,
      int valueLength, byte userBits) throws IOException {
    boolean didReopen = false;
    boolean accessedInactive = false;
    try {
      // No need to get the backup lock prior to synchronizing (correct lock order) since the
      // synchronized block does not attempt to get the backup lock (incorrect lock order)
      synchronized (lock) {
        beingRead = true;
        if ((offsetInOplog + valueLength) > crf.bytesFlushed && !closed) {
          flushAllNoSync(true); // fix for bug 41205
        }
        try {
          final UninterruptibleRandomAccessFile myRAF;
          if (crf.RAFClosed) {
            myRAF = new UninterruptibleRandomAccessFile(crf.f, "r");
            stats.incOpenOplogs();
            if (okToReopen) {
              crf.RAFClosed = false;
              okToReopen = false;
              crf.raf = myRAF;
              didReopen = true;
            }
          } else {
            myRAF = crf.raf;
            accessedInactive = true;
          }
          try {
            final long writePosition =
                (doneAppending) ? crf.bytesFlushed : myRAF.getFilePointer();
            if ((offsetInOplog + valueLength) > writePosition) {
              throw new DiskAccessException(
                  String.format(
                      "Tried to seek to %s, but the file length is %s. Oplog File object used for reading=%s",
                      offsetInOplog + valueLength, writePosition, crf.raf),
                  dr.getName());
            } else if (offsetInOplog < 0) {
              throw new DiskAccessException(
                  String.format("Cannot find record %s when reading from %s",
                      offsetInOplog, diskFile.getPath()),
                  dr.getName());
            }
            final BytesAndBits bb;
            try {
              myRAF.seek(offsetInOplog);
              stats.incOplogSeeks();
              byte[] valueBytes = new byte[valueLength];
              myRAF.readFully(valueBytes);
              stats.incOplogReads();
              bb = new BytesAndBits(valueBytes, userBits);
              // also set the product version for an older product
              final KnownVersion version = getProductVersionIfOld();
              if (version != null) {
                bb.setVersion(version);
              }
            } finally {
              // if this oplog is no longer being appended to then don't waste
              // disk io
              if (!doneAppending) {
                // by seeking back to writePosition
                myRAF.seek(writePosition);
                stats.incOplogSeeks();
              }
            }
            return bb;
          } finally {
            if (myRAF != crf.raf) {
              try {
                myRAF.close();
              } catch (IOException ignore) {
              }
            }
          }
        } finally {
          beingRead = false;
        }
      } // sync
    } finally {
      if (accessedInactive) {
        getOplogSet().inactiveAccessed(this);
      } else if (didReopen) {
        getOplogSet().inactiveReopened(this);
      }
    }
  }
If crfRAF has been closed then attempt to reopen the oplog for this read. Verify that this only
happens when test methods are invoked.

@return true if oplog file is open and can be read from; false if not
geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java