public void operateFlush(TFlushReq req) {
    if (req.getRegionIds() != null && !req.getRegionIds().isEmpty()) {
      StorageEngine.getInstance().syncCloseProcessorsInRegion(req.getRegionIds());
    } else if (req.storageGroups == null || req.storageGroups.isEmpty()) {
      StorageEngine.getInstance().syncCloseAllProcessor();
      WALManager.getInstance().syncDeleteOutdatedFilesInWALNodes();
    } else {
      for (String databaseName : req.storageGroups) {
        if (req.isSeq == null) {
          StorageEngine.getInstance().syncCloseProcessorsInDatabase(databaseName);
        } else {
          StorageEngine.getInstance()
              .syncCloseProcessorsInDatabase(databaseName, Boolean.parseBoolean(req.isSeq));
        }
      }
    }
  }
recover the progress of unfinished repair schedule task
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/StorageEngine.java