Cyrill commented on code in PR #5144:
URL: https://github.com/apache/ozone/pull/5144#discussion_r1305583819
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -2775,7 +2775,32 @@ public OmBucketInfo getBucketInfo(String volume, String
bucket)
bucket, null);
}
metrics.incNumBucketInfos();
- return bucketManager.getBucketInfo(volume, bucket);
+
+ ResolvedBucket resolvedBucket =
+ resolveBucketLink(Pair.of(volume, bucket), true);
Review Comment:
I'm afraid that is not possible at the moment.
Imagine we have a bucket A and a linked bucket L.
And we delete A and L becomes a dangling one.
If we throw an exception as you suggest here, there will be no way to get L
info or delete L.
Moreover, I start to think we should not do any silent link resolution in
`getBucketInfo` at all. Either there should be an explicit parameter or a
different method.
The reason behind this - if I query a linked bucket's info, I want to
understand whether what I got is the direct data of the bucket or the data
comes from the resolved bucket.
I expect link resolution when intending to work with keys in the bucket. And
I expect it not to perform any resolution when working with buckets themselves.
--
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]