@Test(timeout = 60000)
  public void testCompactingMemStoreCellExceedInmemoryFlushSize() throws Exception {
    Configuration conf = HBaseConfiguration.create();
    conf.set(HStore.MEMSTORE_CLASS_NAME, MyCompactingMemStore6.class.getName());

    init(name.getMethodName(), conf, ColumnFamilyDescriptorBuilder.newBuilder(family)
      .setInMemoryCompaction(MemoryCompactionPolicy.BASIC).build());

    MyCompactingMemStore6 myCompactingMemStore = ((MyCompactingMemStore6) store.memstore);

    int size = (int) (myCompactingMemStore.getInmemoryFlushSize());
    byte[] value = new byte[size + 1];

    MemStoreSizing memStoreSizing = new NonThreadSafeMemStoreSizing();
    long timestamp = EnvironmentEdgeManager.currentTime();
    long seqId = 100;
    ExtendedCell cell = createCell(qf1, timestamp, seqId, value);
    int cellByteSize = MutableSegment.getCellLength(cell);
    store.add(cell, memStoreSizing);
    assertTrue(memStoreSizing.getCellsCount() == 1);
    assertTrue(memStoreSizing.getDataSize() == cellByteSize);
    // Waiting the in memory compaction completed, see HBASE-26438
    myCompactingMemStore.inMemoryCompactionEndCyclicBarrier.await();
  }
1.smallCellThread enters CompactingMemStore.checkAndAddToActiveSize first, then
largeCellThread enters CompactingMemStore.checkAndAddToActiveSize, and then largeCellThread
invokes flushInMemory.
<p/>
2. After largeCellThread finished CompactingMemStore.flushInMemory method, smallCellThread
can add cell to currentActive . That is to say when largeCellThread called flushInMemory
method, CompactingMemStore.active has no cell.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java