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/15 18:12:39 UTC

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

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



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMAllocateBlockRequest.java
##########
@@ -192,6 +193,17 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
             KEY_NOT_FOUND);
       }
 
+      if (ozoneManager.getEnableFileSystemPaths()) {
+        // Ensure the parent exist.
+        if (!"".equals(OzoneFSUtils.getParent(keyName))

Review comment:
       Just a question: Right now delete/rename is not an atomic operation, so will just checking the parent Dir is enough?
   
   
   But this will help, once we have HDDS-2939 where we have atomic delete/renames.

##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMAllocateBlockRequest.java
##########
@@ -192,6 +193,17 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
             KEY_NOT_FOUND);
       }
 
+      if (ozoneManager.getEnableFileSystemPaths()) {
+        // Ensure the parent exist.
+        if (!"".equals(OzoneFSUtils.getParent(keyName))

Review comment:
       And also for performance reasons, can we leave allocateBlock, as during KeyCommit anyway we shall figure it out?
   
   As this will save one extra DB op, (this might not be a problem again once HDDS-2939 comes in, as it has directory cache)




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