Anastasia Braginsky commented on HBASE-16645:

Hi [~chia7712],

Indeed amazing job you have done! Thank you! I admit that descending part was 
not correct and the border cases also.
Based on your great test case I have improved my version of the code to be 
correct, using more if-statements (and more comments, of course :) ).
I can share the code with you if you want to see it.

Your suggested code is correct, but hard to decipher. My big concern is about 
maintenance of the getValidIndex(...) method.
It took me a while to understand what is going on there and I am familiar with 
the code. I wonder what if someone unfamiliar will need to update something 
I am OK with replacing my code with yours, if you add enough comments to 
explain the intuition behind the logical operands.
More comments in the review board.


> Wrong range of Cells is caused by CellFlatMap#tailMap, headMap, and SubMap
> --------------------------------------------------------------------------
>                 Key: HBASE-16645
>                 URL: https://issues.apache.org/jira/browse/HBASE-16645
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: ChiaPing Tsai
>            Priority: Minor
>             Fix For: 2.0.0
>         Attachments: HBASE-16645.v0.patch, HBASE-16645.v1.patch
> Two reasons are shown below:
> 1) CellFlatMap#find doesn’t consider desc order array
> 2) CellFlatMap#getValidIndex return the wrong upper bound

This message was sent by Atlassian JIRA

Reply via email to