@Test
  public void testConcurrentRollingAndGet() {
    final int MAX_OPLOG_SIZE = 1000 * 2;
    DiskRegionProperties diskProps = new DiskRegionProperties();
    diskProps.setMaxOplogSize(MAX_OPLOG_SIZE);
    diskProps.setPersistBackup(true);
    diskProps.setRolling(true);
    diskProps.setCompactionThreshold(100);
    diskProps.setSynchronous(true);
    diskProps.setOverflow(false);
    final int TOTAL_SWITCHING = 200;
    final int TOTAL_KEYS = 20;

    final List threads = new ArrayList();
    final byte[] val = new byte[100];
    region = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache, diskProps, Scope.LOCAL);
    LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = false;

    CacheObserver old = CacheObserverHolder.setInstance(new CacheObserverAdapter() {
      @Override
      public void beforeGoingToCompact() {
        for (int k = 0; k < TOTAL_KEYS; ++k) {
          final int num = k;
          Thread th = new Thread(() -> {

            byte[] val_on_disk = null;
            try {
              val_on_disk = (byte[]) ((LocalRegion) region).getValueOnDisk("key" + (num + 1));
              assertTrue(
                  "byte  array was not of right size  as its size was " + val_on_disk.length,
                  val_on_disk.length == 100);

            } catch (Exception e) {
              encounteredFailure = true;
              logWriter.error("Test encountered exception ", e);
              throw new AssertionError(
                  " Test failed as could not obtain value from disk.Exception = ", e);
            }

          });
          threads.add(th);
        }
        for (int j = 0; j < TOTAL_KEYS; ++j) {
          ((Thread) threads.get(rollingCount++)).start();
        }

      }

    });

    for (int i = 0; i < TOTAL_SWITCHING; ++i) {
      for (int j = 0; j < TOTAL_KEYS; ++j) {
        region.put("key" + (j + 1), val);

      }
      LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = true;
      try {
        Thread.sleep(100);
      } catch (InterruptedException e) {
        logWriter.error("Main thread encountered exception ", e);
        throw new AssertionError(" Test failed as main thread encountered exception = ", e);
      }
    }

    LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = false;
    for (Object thread : threads) {
      Thread th = (Thread) thread;
      if (th != null) {
        ThreadUtils.join(th, 30 * 1000);
      }
    }
    assertTrue(
        "The test will fail as atleast one  thread doing get operation encounetred exception",
        !encounteredFailure);
    CacheObserverHolder.setInstance(old);
    closeDown();

  }
Check if the roller thread cant skip rolling the entry & if a get is done on that entry , it is
possible for the get operation to get the Oplog which is not yet destroyed but by the time a
basicGet is done,the oplog gets destroyed & the get operation sees the file length zero or it
may encounter null pointer exception while retrieving the oplog.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ConcurrentRollingAndRegionOperationsJUnitTest.java