You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2013/01/16 08:58:13 UTC

[jira] [Assigned] (HBASE-7579) HTableDescriptor equals method fails if results are returned in a different order

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

ramkrishna.s.vasudevan reassigned HBASE-7579:
---------------------------------------------

    Assignee: Aleksandr Shulman
    
> HTableDescriptor equals method fails if results are returned in a different order
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-7579
>                 URL: https://issues.apache.org/jira/browse/HBASE-7579
>             Project: HBase
>          Issue Type: Bug
>          Components: Admin
>            Reporter: Aleksandr Shulman
>            Assignee: Aleksandr Shulman
>            Priority: Minor
>
> HTableDescriptor's compareTo function compares a set of HColumnDescriptors against another set of HColumnDescriptors. It iterates through both, relying on the fact that they will be in the same order.
> In my testing, I may have seen this issue come up, so I decided to fix it.
> It's a straightforward fix. I convert the sets into a hashset for O(1) lookups (at least in theory), then I check that all items in the first set are found in the second.
> Since the sizes are the same, we know that if all elements showed up in the second set, then they must be equal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira