griffonbyte opened a new pull request, #10638:
URL: https://github.com/apache/gravitino/pull/10638

   ### What changes were proposed in this pull request?
   
   Updated the METALAKE branch in `MetadataObjectUtil.toEntityIdent` to build 
the identifier from `metadataObject.name()` instead of the `metalakeName` 
context parameter.
   
   ### Why are the changes needed?
   
   When a request carried a METALAKE metadata object whose name differed from 
the surrounding `metalakeName` context, `toEntityIdent` resolved against the 
context metalake rather than the target object. This meant validation in 
`checkMetadataObject` could pass against the wrong metalake for generic REST 
flows like owner operations.
   
   ### Does this PR introduce any user-facing change?
   
   No. This is an internal correctness fix. The existing validation in 
`checkMetadataObject` already rejects cases where 
`metalake.equals(object.name())` is false, so mismatched requests were caught 
there. This change makes `toEntityIdent` itself consistent with that 
expectation.
   
   ### How was this patch tested?
   
   Added a test case to `TestMetadataObjectUtil` that verifies the metadata 
object's own name is used for the identifier rather than the surrounding 
context metalake name.
   
   Fixes #10621


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

Reply via email to