@Override
    public void preFlush(ObserverContext<? extends RegionCoprocessorEnvironment> e,
      FlushLifeCycleTracker tracker) throws IOException {
      if (delayFlush) {
        try {
          if (
            Bytes.compareTo(e.getEnvironment().getRegionInfo().getStartKey(),
              HConstants.EMPTY_START_ROW) != 0
          ) {
            Thread.sleep(100);
          }
        } catch (InterruptedException e1) {
          throw new InterruptedIOException(e1.getMessage());
        }
      }
    }
This coprocessor is used to delay the flush.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMobCloneSnapshotFromClientCloneLinksAfterDelete.java