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/02/03 18:16:22 UTC

[GitHub] [hadoop-ozone] arp7 commented on a change in pull request #501: HDDS-2944. Handle replay of KeyCommitRequest and DirectoryCreateRequest

arp7 commented on a change in pull request #501: HDDS-2944. Handle replay of KeyCommitRequest and DirectoryCreateRequest
URL: https://github.com/apache/hadoop-ozone/pull/501#discussion_r374259248
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMDirectoryCreateRequest.java
 ##########
 @@ -126,16 +143,17 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
     boolean acquiredLock = false;
     IOException exception = null;
     OMClientResponse omClientResponse = null;
+    Result result = null;
     try {
       // check Acl
       checkKeyAcls(ozoneManager, volumeName, bucketName, keyName,
           IAccessAuthorizer.ACLType.CREATE, OzoneObj.ResourceType.KEY);
 
       // Check if this is the root of the filesystem.
       if (keyName.length() == 0) {
-        return new OMDirectoryCreateResponse(null,
-            omResponse.setCreateDirectoryResponse(
-                CreateDirectoryResponse.newBuilder()).build());
+        throw new OMException("Directory create failed. Cannot create " +
 
 Review comment:
   Yeah the change seems correct to me. @bharatviswa504 what do you think?

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


With regards,
Apache Git Services

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