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 2021/11/24 11:10:05 UTC

[GitHub] [ozone] rakeshadr commented on a change in pull request #2867: HDDS-6043. Buckets created via link command do not mirror layout of s…

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



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java
##########
@@ -115,6 +115,22 @@ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
           OMException.ResultCodes.INVALID_REQUEST);
     }
 
+    // If this is a Link Bucket, we make sure that its layout matches the
+    //  source bucket. This prevents inconsistencies during list operations.
+    if (hasSourceBucket) {
+      try {
+        newBucketInfo.setBucketLayout(

Review comment:
       Still there is one gap for the pre-created bucket-links. Those buckets will mismatched with the real source bucket. Instead of adding a logic here, how about checking `omBucketInfo#isLink()` during listing bucket then get the source bucket's layout, if source exists?
   
   https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java#L826




-- 
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: issues-unsubscribe@ozone.apache.org

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