private void checkPersist(boolean forcePersist) {
    if (forcePersist || currentIndex - lastFlushedIndex >= checkpointGap) {
      persist();
    }
  }
An index controller class to balance the performance degradation of frequent disk I/O.
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/IndexController.java