private void deleteCurrentWritingFile(PipeConsensusTsFileWriter tsFileWriter) {
    if (tsFileWriter.getWritingFile() != null) {
      deleteFileOrDirectoryIfExists(
          tsFileWriter.getWritingFile(),
          String.format("TsFileWriter-%s delete current writing file", tsFileWriter.index));
    } else {
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(
            "PipeConsensus-PipeName-{}: Current writing file is null. No need to delete.",
            consensusPipeName.toString());
      }
    }
  }
This method cannot be set to synchronize. Receive events can be concurrent since reqBuffer but
load event must be synchronized.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/pipeconsensus/PipeConsensusReceiver.java