You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2018/07/24 04:28:00 UTC

[jira] [Commented] (HBASE-20928) binarySearch function in RowIndexSeekerV1 is buggy

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

Ted Yu commented on HBASE-20928:
--------------------------------

There is similar issue with Bytes#binarySearch .

Mind fixing that method as well ?

> binarySearch function in RowIndexSeekerV1 is buggy
> --------------------------------------------------
>
>                 Key: HBASE-20928
>                 URL: https://issues.apache.org/jira/browse/HBASE-20928
>             Project: HBase
>          Issue Type: Bug
>          Components: io
>            Reporter: saurabh singh
>            Priority: Minor
>         Attachments: HBASE-20928-fix-binarySearch.patch
>
>
> There are couple of issues in the function:
>  * {{>>>}} operator would mess the values if {{low}} + {{high}} end up being negative. This shouldn't happen but I don't see anything to prevent this from happening.
>  * The code fails around boundary values of {{low}} and {{high}}. This is a well known binary search catch. [https://ai.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)