@SuppressWarnings("squid:S2445")
  public Future<?> registerTsFileProcessor(TsFileProcessor tsFileProcessor) {
    synchronized (tsFileProcessor) {
      if (tsFileProcessor.isManagedByFlushManager()) {
        return CompletableFuture.completedFuture(null);
      } else {
        if (tsFileProcessor.getFlushingMemTableSize() > 0) {
          tsFileProcessor.setManagedByFlushManager(true);
          return flushPool.submit(new FlushThread(tsFileProcessor));
        } else {
          return CompletableFuture.completedFuture(null);
        }
      }
    }
  }
Add tsFileProcessor to asyncTryToFlush manager

@param tsFileProcessor tsFileProcessor to be flushed
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/FlushManager.java