ChenSammi commented on code in PR #10781:
URL: https://github.com/apache/ozone/pull/10781#discussion_r4376216479


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java:
##########
@@ -682,7 +734,10 @@ public static Builder builderFromProtobuf(BucketInfo 
bucketInfo,
         .setBucketName(bucketInfo.getBucketName())
         .setAcls(bucketInfo.getAclsList().stream().map(
             OzoneAcl::fromProtobuf).collect(Collectors.toList()))
-        .setIsVersionEnabled(bucketInfo.getIsVersionEnabled())
+        // The deprecated isVersionEnabled flag is ignored.
+        .setVersioningStatus(bucketInfo.hasVersioningStatus()
+            ? 
BucketVersioningStatus.fromProto(bucketInfo.getVersioningStatus())
+            : null)

Review Comment:
   If bucketInfo.hasVersioningStatus() is null, shall we also check 
IsVersionEnabled(), like what is done in OmBucketArgs? 



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