You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/12/10 10:24:50 UTC

[GitHub] [ozone] rakeshadr commented on a change in pull request #1682: HDDS-4574. Inconsistencies in case the parent of a open file is deleted/renamed.

rakeshadr commented on a change in pull request #1682:
URL: https://github.com/apache/ozone/pull/1682#discussion_r540047078



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
##########
@@ -172,6 +173,16 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
         throw new OMException("Failed to commit key, as " + dbOpenKey +
             "entry is not found in the OpenKey table", KEY_NOT_FOUND);
       }
+
+      // Ensure the parent exist.
+      if (!"".equals(OzoneFSUtils.getParent(keyName))

Review comment:
       Can you move this check inside `ozoneManager.getEnableFileSystemPaths() == true` case to do this only for FileSystem api. 
   
   Should we need this check for bucket#createKey & OzoneOutputStream#close() in turn make OMKeyCommitRequest call?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org