hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksandr Shulman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7579) HTableDescriptor equals method fails if results are returned in a different order
Date Mon, 04 Mar 2013 19:35:13 GMT

    [ https://issues.apache.org/jira/browse/HBASE-7579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13592539#comment-13592539
] 

Aleksandr Shulman commented on HBASE-7579:
------------------------------------------

Hi Lars, sorry about the delay in responding.
Good point about the TreeMap always returning result in a deterministic ordering. The patch
itself I think is still beneficial because it removes a little bit of redundancy in the existing
equality code. IMO, the fix makes it easier to understand as well. In addition, the tests
are beneficial since we were missing coverage there.

I think it'd be better if the fix were in sooner, but it's probably not an issue if we moved
it to 0.94.7.
                
> 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
>    Affects Versions: 0.95.0, 0.94.6
>            Reporter: Aleksandr Shulman
>            Assignee: Aleksandr Shulman
>            Priority: Minor
>             Fix For: 0.95.0, 0.94.7
>
>         Attachments: HBASE-7579-v1.patch, HBASE-7579-v2.patch, HBASE-7579-v3.patch, HBASE-7579-v4.patch
>
>
> 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

Mime
View raw message