hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8317) Seek returns wrong result with PREFIX_TREE Encoding
Date Wed, 10 Apr 2013 11:18:17 GMT

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

ramkrishna.s.vasudevan commented on HBASE-8317:
-----------------------------------------------

@Chunhui
I am not aware of this Prefix. But one thing i noticed is that,
for batch0_row2* it is behaving bit different for others bit different.

Even after this patch if you see the matching entries it goes like this,
{code}
batch0_row0/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row0/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row1/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row1/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row3/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row3/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row5/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row5/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row6/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row6/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row7/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row7/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row8/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row8/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row9/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row9/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row2/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row20/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row20/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row21/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row21/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row22/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row22/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row23/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row23/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row24/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row24/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row25/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row25/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row26/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row26/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row27/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row27/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row28/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row28/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row29/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row29/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0 #batch0_row4/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=26/mvcc=0
batch0_row40/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row40/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row41/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row41/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row42/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row42/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row43/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row43/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row44/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row44/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row45/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row45/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row46/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row46/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row47/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row47/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row48/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row48/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
batch0_row49/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0 #batch0_row49/EncodingTestCF:col0/LATEST_TIMESTAMP/Put/vlen=27/mvcc=0
{code}
I added the below print stmt to get the above result
{code}
 if (hasMoreOfEncodeScanner) {
        System.out.println(encodeSeeker.getKeyValue()+ " #"+collectionScanner.peek());
        if (KeyValue.COMPARATOR.compare(encodeSeeker.getKeyValue(),
            collectionScanner.peek()) != 0) {
          //dumpInputKVSet();
          fail("Expected " + collectionScanner.peek() + " actual "
              + encodeSeeker.getKeyValue() + ", after seeking " + firstOnRow);
        }
      }
{code}
If you see for row1* and row3* the behaviour is that row1* is always matched with row2 and
row3* always matches with row4.
But for row2* and row4* the matching is happening correctly.  Why is it so?  I need to read
the code to understand what this does.  But just observed these things.
                
> Seek returns wrong result with PREFIX_TREE Encoding
> ---------------------------------------------------
>
>                 Key: HBASE-8317
>                 URL: https://issues.apache.org/jira/browse/HBASE-8317
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.95.0
>            Reporter: chunhui shen
>            Assignee: chunhui shen
>         Attachments: hbase-trunk-8317.patch
>
>
> TestPrefixTreeEncoding#testSeekWithFixedData from the patch could reproduce the bug.
> An example of the bug case:
> Suppose the following rows:
> 1.row3/c1:q1/
> 2.row3/c1:q2/
> 3.row3/c1:q3/
> 4.row4/c1:q1/
> 5.row4/c1:q2/
> After seeking the row 'row30', the expected peek KV is row4/c1:q1/, but actual is row3/c1:q1/.
> I just fix this bug case in the patch, 
> Maybe we can do more for other potential problems if anyone is familiar with the code
of PREFIX_TREE

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