ayushtkn commented on code in PR #3561:
URL: https://github.com/apache/hive/pull/3561#discussion_r961928935


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -4293,7 +4293,7 @@ private void deleteOldPathForReplace(Path destPath, Path 
oldPath, HiveConf conf,
       // But not sure why we changed not to delete the oldPath in HIVE-8750 if 
it is
       // not the destf or its subdir?
       isOldPathUnderDestf = isSubDir(oldPath, destPath, oldFs, destFs, false);
-      if (isOldPathUnderDestf) {
+      if (isOldPathUnderDestf && oldFs.exists(oldPath)) {
         cleanUpOneDirectoryForReplace(oldPath, oldFs, pathFilter, conf, purge, 
isNeedRecycle);

Review Comment:
   Well I see it is a backport but about the fix, having an exist check 
increased on RPC for every genuine case as well, instead shouldn't we have 
ignored the FNF in `` cleanUpOneDirectoryForReplace``?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to