hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jieshan Bean (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-6200) KeyComparator.compareWithoutRow can be wrong when families have the same prefix
Date Mon, 25 Jun 2012 12:25:43 GMT

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

Jieshan Bean updated HBASE-6200:
--------------------------------

    Attachment: PerformanceTestCase-6200-94.patch

This is how I did this test:
1. Test comparing between 'famia:qualia' with 'famib:qualia'. Run for 1000000*2 times. Calculate
the time consumed(Using System.currentTimeMillis() to get current time).
2. Test comparing between 'fami:qualia' with 'fami:qualib'. Run for 1,000,000*2 times. Calculate
the time consumed.
3. Repeats 1~2 for 20 times. Accumulate the total consumed time at step 1 and step 2, and
then calculate for the average time.
4. Repeats 1~3 for 3 groups.

Please find the attached file "PerformanceTestCase-6200-94.patch" for details.

And this is the test results in my machine(Machine info: 64-bit Suse, CPU: 16 * 1.6GHz, Memory:
32GB):

[With patch 6200]
{noformat}
Group-1:
Compare {famia:qualia} with {famib:qualia} used time(totally) -> 2425, average -> 121
Compare {fami:qualia} with {fami:qualib} used time(totally) -> 3282, average -> 164

Group-2:
Compare {famia:qualia} with {famib:qualia} used time(totally) -> 2421, average -> 121
Compare {fami:qualia} with {fami:qualib} used time(totally) -> 3279, average -> 163

Group-3:
Compare {famia:qualia} with {famib:qualia} used time(totally) -> 2417, average -> 120
Compare {fami:qualia} with {fami:qualib} used time(totally) -> 3279, average -> 163
{noformat}

[Without patch 6200]
{noformat}
Group-1:
Compare {famia:qualia} with {famib:qualia} used time(totally) -> 2015, average -> 100
Compare {fami:qualia} with {fami:qualib} used time(totally) -> 2191, average -> 109

Group-12:
Compare {famia:qualia} with {famib:qualia} used time(totally) -> 2014, average -> 100
Compare {fami:qualia} with {fami:qualib} used time(totally) -> 2186, average -> 109

Group-13: 
Compare {famia:qualia} with {famib:qualia} used time(totally) -> 2012, average -> 100
Compare {fami:qualia} with {fami:qualib} used time(totally) -> 2186, average -> 109
{noformat}

Plz share your comments:)
                
> KeyComparator.compareWithoutRow can be wrong when families have the same prefix
> -------------------------------------------------------------------------------
>
>                 Key: HBASE-6200
>                 URL: https://issues.apache.org/jira/browse/HBASE-6200
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.90.6, 0.92.1, 0.94.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: Jieshan Bean
>            Priority: Blocker
>             Fix For: 0.90.7, 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 6200-trunk-v2.patch, HBASE-6200-90-v2.patch, HBASE-6200-90.patch,
HBASE-6200-92-v2.patch, HBASE-6200-92.patch, HBASE-6200-94-v2.patch, HBASE-6200-94.patch,
HBASE-6200-trunk-v2.patch, HBASE-6200-trunk.patch, PerformanceTestCase-6200-94.patch
>
>
> As reported by Desert Rose on IRC and on the ML, {{Result}} has a weird behavior when
some families share the same prefix. He posted a link to his code to show how it fails, http://pastebin.com/7TBA1XGh
> Basically {{KeyComparator.compareWithoutRow}} doesn't differentiate families and qualifiers
so "f:a" is said to be bigger than "f1:", which is false. Then what happens is that the KVs
are returned in the right order from the RS but then doing {{Result.binarySearch}} it uses
{{KeyComparator.compareWithoutRow}} which has a different sorting so the end result is undetermined.
> I added some debug and I can see that the data is returned in the right order but {{Arrays.binarySearch}}
returned the wrong KV, which is then verified agains the passed family and qualifier which
fails so null is returned.
> I don't know how frequent it is for users to have families with the same prefix, but
those that do have that and that use those families at the same time will have big correctness
issues. This is why I mark this as a blocker.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message