private void handleTsFilePipeData(final TsFilePipeData tsFilePipeData, final String fileDir) {
    final String tsFileName = tsFilePipeData.getTsFileName();
    final File dir = new File(fileDir);
    final File[] targetFiles =
        dir.listFiles((dir1, name) -> name.startsWith(tsFileName) && name.endsWith(PATCH_SUFFIX));
    if (targetFiles != null) {
      for (final File targetFile : targetFiles) {
        final File newFile =
            new File(
                dir,
                targetFile
                    .getName()
                    .substring(0, targetFile.getName().length() - PATCH_SUFFIX.length()));
        if (!targetFile.renameTo(newFile)) {
          LOGGER.error("Fail to rename file {} to {}", targetFile, newFile);
        }
      }
    }
    tsFilePipeData.setParentDirPath(dir.getAbsolutePath());
  }
handle when successfully receive tsFilePipeData. Rename .patch file and reset tsFilePipeData's
path.

@param tsFilePipeData pipeData
@param fileDir path of file data dir
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java