You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2024/01/19 10:28:00 UTC

[jira] [Updated] (HDDS-10161) Standardize hashCode and equals for volume, bucket, and key

     [ https://issues.apache.org/jira/browse/HDDS-10161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Andika updated HDDS-10161:
-------------------------------
    Description: 
It's found that OmBucketInfo and OmKeyInfo {{equals}} and {{hashCode}} do not contain the same attributes.

Also OmVolumeArgs only compares volume based on the ObjectID, which might not be enough to ensure equality.

We need to standardize the usage of hashcode and equals to prevent unexpected behaviors.

  was:
It's found that OmBucketInfo and OmKeyInfo {{equals}} and {{hashCode}} do not contain the same attributes.

Also OmVolumeArgs only compares volume based on the ObjectID, which might not be enough to ensure equality.

We need to standardize the usage of hashcode and equals so that there are no unexpected behaviors regarding different objects.


> Standardize hashCode and equals for volume, bucket, and key
> -----------------------------------------------------------
>
>                 Key: HDDS-10161
>                 URL: https://issues.apache.org/jira/browse/HDDS-10161
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Ivan Andika
>            Assignee: Ivan Andika
>            Priority: Major
>
> It's found that OmBucketInfo and OmKeyInfo {{equals}} and {{hashCode}} do not contain the same attributes.
> Also OmVolumeArgs only compares volume based on the ObjectID, which might not be enough to ensure equality.
> We need to standardize the usage of hashcode and equals to prevent unexpected behaviors.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org