HTHou commented on code in PR #18349:
URL: https://github.com/apache/iotdb/pull/18349#discussion_r3701151029
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/builder/PipeTableModelTsFileBuilder.java:
##########
@@ -189,7 +189,8 @@ List<Pair<String, File>> writeTableModelTabletsToTsFiles(
}
for (final Pair<String, File> sealedFile : sealedFiles) {
- final boolean deleteSuccess =
FileUtils.deleteQuietly(sealedFile.right);
+ final boolean deleteSuccess =
+
org.apache.iotdb.commons.utils.FileUtils.deleteFileIfExist(sealedFile.right);
Review Comment:
[P2] Could we migrate the remaining
`org.apache.tsfile.external.commons.io.FileUtils.deleteQuietly(...)` call sites
as well? This class still uses it at lines 92 and 162, and there are nine
production call sites in total. That helper ultimately calls `File.delete()`,
so those cleanup deletions still bypass the configured `FileSystemProvider`.
The forbiddenapis check scans IoTDB call-site bytecode and therefore does not
see the transitive `File.delete()` inside the TsFile dependency. Please replace
the remaining file cleanups with
`org.apache.iotdb.commons.utils.FileUtils.deleteFileIfExist(...)` (using the
directory variant where appropriate), and consider forbidding the
`deleteQuietly(File)` wrapper signature to prevent it from being reintroduced.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]