Copilot commented on code in PR #10745:
URL: https://github.com/apache/ozone/pull/10745#discussion_r3626808276
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -2993,8 +2993,17 @@ public List<OmBucketInfo> listBuckets(String volumeName,
String startKey,
volumeName, null, null);
}
metrics.incNumBucketLists();
- return bucketManager.listBuckets(volumeName,
+ List<OmBucketInfo> buckets = bucketManager.listBuckets(volumeName,
startKey, prefix, maxNumOfBuckets, hasSnapshot);
+ Map<Pair<String, String>, OmBucketInfo> resolvedSourceCache = new
HashMap<>();
+ for (int i = 0; i < buckets.size(); i++) {
+ try {
+ buckets.set(i, enrichLinkBucketInfo(buckets.get(i),
resolvedSourceCache));
+ } catch (IOException e) {
+ // Keep the raw bucket entry if source resolution fails.
+ }
+ }
Review Comment:
The IOException from link-bucket enrichment is swallowed silently. This
makes it hard to diagnose cases where link resolution unexpectedly fails (eg,
inconsistent metadata or ACL issues), because callers will just see placeholder
values again with no server-side trace.
--
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]