morningman commented on code in PR #33798: URL: https://github.com/apache/doris/pull/33798#discussion_r1568792117
########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java: ########## @@ -575,15 +582,18 @@ private DeleteRecursivelyResult doRecursiveDeleteFiles(Path directory, boolean d boolean allDescendentsDeleted = true; ImmutableList.Builder<String> notDeletedEligibleItems = ImmutableList.builder(); for (RemoteFile file : allFiles) { - String fileName = file.getName(); - if (!deleteIfExists(new Path(fileName))) { + if (file.getName().startsWith(queryId)) { Review Comment: use `contains`? ########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java: ########## @@ -558,10 +564,11 @@ private DeleteRecursivelyResult recursiveDeleteFiles(Path directory, boolean del return new DeleteRecursivelyResult(false, notDeletedEligibleItems.build()); } - return doRecursiveDeleteFiles(directory, deleteEmptyDir); + String queryId = DebugUtil.printId(ConnectContext.get().queryId()); Review Comment: I suggest to save query id when generating this HiveTransaction. Because `ConnectContext.get()` is a thread local var, it may be null if we run this transaction in another thread -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org