kerneltime commented on PR #5144:
URL: https://github.com/apache/ozone/pull/5144#issuecomment-1678187596

   > Thanks for looking at this @Cyrill. While the change does work, I'm not 
sure it is the best way to fix the problem.
   > 
   > The method `OzoneManagerUtils#resolveLinkBucketLayout` is only intended to 
resolve the bucket layout, not other properties like rep config or quota. Quota 
has a similar problem, where it can be set on the source but not returned in 
the bucket link's info. We need a more general solution for getting the 
properties of the source bucket when working with bucket links. The only real 
caller of this method is `BucketManagerImpl#getBucketInfo`, which can be called 
by `OzoneManager#resolveBucketLink`, meaning the bucket links can be resolved 
twice.
   > 
   > I think we should get rid of this method and make sure bucket resolution 
is happening only once through a proper channel like 
`OzoneManager#resolveBucketLink`. A unit test that retrieves bucket info for a 
link and source and checks that only the names are different can validate this 
for all pieces of bucket metadata.
   
   `getBucketInfo` can be implemented to first resolve the bucket at the end of 
the nest chain link and then call the `metadataManager` to get the 
`OmBucketInfo`. That should preserve the behavior of the call `getBucketInfo`  
independent of the linking. 


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