LuciferYang opened a new issue, #13441:
URL: https://github.com/apache/gravitino/issues/13441

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   `ExtendedGroupPO.equals` compares only `roleIds` and `roleNames`, but 
`hashCode` folds in `super.hashCode()` (the `GroupPO` identity fields: groupId, 
groupName, metalakeId, and so on). Two extended rows for different groups with 
identical role strings are therefore `equals`-true but hash to different 
values, which breaks the `Object.equals`/`hashCode` contract and loses them in 
any `HashSet`/`HashMap`. The sibling `ExtendedUserPO` already calls 
`super.equals`.
   
   ### How to reproduce
   
   Build two `ExtendedGroupPO` instances for different groups (different 
groupId/groupName) with the same role lists. They compare `equals` while their 
`hashCode` values differ.
   


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