@Deprecated
  private void interleavedFlush(ISchemaPage page, SchemaPageContext cxt) throws IOException {
    if (cxt.lastLeafPage == null || cxt.lastLeafPage.getPageIndex() == page.getPageIndex()) {
      return;
    }
    cxt.interleavedFlushCnt++;
    if (metric != null) {
      metric.recordFlushPageNum(1);
    }
    pageIOChannel.flushSinglePage(cxt.lastLeafPage);
    // this lastLeaf shall only be lock once
    cxt.dirtyCnt--;

    // unlock and deref the page from context
    if (cxt.lockTraces.contains(cxt.lastLeafPage.getPageIndex())) {
      cxt.lastLeafPage.getLock().writeLock().unlock();
      cxt.lockTraces.remove(cxt.lastLeafPage.getPageIndex());
    }
    cxt.lastLeafPage.decrementAndGetRefCnt();

    // can be reclaimed since the page only referred by pageInstCache
    cxt.referredPages.remove(cxt.lastLeafPage.getPageIndex());
    // alleviate eviction pressure
    pagePool.remove(cxt.lastLeafPage.getPageIndex());

    cxt.lastLeafPage = page.getAsSegmentedPage();
  }
when page prepares to insert, compare it with lastLeaf from context. if not same, then flush
the lastLeaf, unlock, deref, and remove it from dirtyPages. lastLeafPage only initiated at
overflowOperation
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/pagemgr/PageManager.java