[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Purtell updated HBASE-20928: --- Fix Version/s: 1.5.0 > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > Key: HBASE-20928 > URL: https://issues.apache.org/jira/browse/HBASE-20928 > Project: HBase > Issue Type: Bug > Components: io >Reporter: saurabh singh >Assignee: saurabh singh >Priority: Minor > Fix For: 1.5.0, 2.2.0 > > Attachments: HBASE-20928-addendum.patch, > HBASE-20928-fix-binarySearch-v5.patch, HBASE-20928-fix-binarySearch-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-20928: --- Resolution: Fixed Status: Resolved (was: Patch Available) > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > Key: HBASE-20928 > URL: https://issues.apache.org/jira/browse/HBASE-20928 > Project: HBase > Issue Type: Bug > Components: io >Reporter: saurabh singh >Assignee: saurabh singh >Priority: Minor > Fix For: 2.2.0 > > Attachments: HBASE-20928-addendum.patch, > HBASE-20928-fix-binarySearch-v5.patch, HBASE-20928-fix-binarySearch-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-20928: --- Status: Patch Available (was: Reopened) > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > Key: HBASE-20928 > URL: https://issues.apache.org/jira/browse/HBASE-20928 > Project: HBase > Issue Type: Bug > Components: io >Reporter: saurabh singh >Assignee: saurabh singh >Priority: Minor > Fix For: 2.2.0 > > Attachments: HBASE-20928-addendum.patch, > HBASE-20928-fix-binarySearch-v5.patch, HBASE-20928-fix-binarySearch-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xu Cang updated HBASE-20928: Attachment: HBASE-20928-addendum.patch > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > Key: HBASE-20928 > URL: https://issues.apache.org/jira/browse/HBASE-20928 > Project: HBase > Issue Type: Bug > Components: io >Reporter: saurabh singh >Assignee: saurabh singh >Priority: Minor > Fix For: 2.2.0 > > Attachments: HBASE-20928-addendum.patch, > HBASE-20928-fix-binarySearch-v5.patch, HBASE-20928-fix-binarySearch-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-20928: --- Resolution: Fixed Hadoop Flags: Reviewed Status: Resolved (was: Patch Available) Thanks for the patch, Saurabh I modified the subject to conform to current JIRA subject. > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > Key: HBASE-20928 > URL: https://issues.apache.org/jira/browse/HBASE-20928 > Project: HBase > Issue Type: Bug > Components: io >Reporter: saurabh singh >Assignee: saurabh singh >Priority: Minor > Fix For: 2.2.0 > > Attachments: HBASE-20928-fix-binarySearch-v5.patch, > HBASE-20928-fix-binarySearch-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-20928: --- Fix Version/s: 2.2.0 > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > Key: HBASE-20928 > URL: https://issues.apache.org/jira/browse/HBASE-20928 > Project: HBase > Issue Type: Bug > Components: io >Reporter: saurabh singh >Priority: Minor > Fix For: 2.2.0 > > Attachments: HBASE-20928-fix-binarySearch-v5.patch, > HBASE-20928-fix-binarySearch-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] saurabh singh updated HBASE-20928: -- Status: Open (was: Patch Available) > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > 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-v5.patch, > HBASE-20928-fix-binarySearch-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] saurabh singh updated HBASE-20928: -- Attachment: HBASE-20928-fix-binarySearch-v5.patch Status: Patch Available (was: Open) > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > 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-v5.patch, > HBASE-20928-fix-binarySearch-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (HBASE-20928) Rewrite calculation of midpoint in binarySearch functions to prevent overflow
[ https://issues.apache.org/jira/browse/HBASE-20928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-20928: --- Summary: Rewrite calculation of midpoint in binarySearch functions to prevent overflow (was: binarySearch function in RowIndexSeekerV1 is buggy) > Rewrite calculation of midpoint in binarySearch functions to prevent overflow > - > > 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-v5.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] > > Most of the code should already be covered by tests. I would have liked to > add a test that actually fails without the fix but given these are private > methods I am not sure on the best place to add the test. Suggestions? -- This message was sent by Atlassian JIRA (v7.6.3#76005)