private void clearReferences(HRegion region) throws IOException {
    // Presumption.
    assertEquals(1, region.getStores().size());
    HStore store = region.getStores().get(0);
    while (store.hasReferences()) {
      while (store.storeEngine.getCompactor().isCompacting()) {
        Threads.sleep(100);
      }
      // Run new compaction. Shoudn't be any others running.
      region.compact(true);
      store.closeAndArchiveCompactedFiles();
    }
  }
Test that if daughter split on us, we won't do the shutdown handler fixup just because we can't
find the immediate daughter of an offlined parent.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java