You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2015/09/11 18:23:46 UTC

[jira] [Updated] (CASSANDRA-10301) Search for items past end of descending BTreeSearchIterator can fail

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

Aleksey Yeschenko updated CASSANDRA-10301:
------------------------------------------
    Reviewer: Branimir Lambov

> Search for items past end of descending BTreeSearchIterator can fail
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-10301
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10301
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Blocker
>             Fix For: 3.0.0 rc1
>
>
> A very simple problem, but obvious and with simple fix once it is made apparent.
> The internal {{seekTo}} method uses {{binarySearch}} semantics for its return value, however when searching backwards {{-1}} is a real value that should be returned to the client, as it indicates "past the end" - so basing inexact matches from -1 leads to a conflicting meaning, and so it gets misinterpreted. Rebasing inexact results to -2 fixes the problem.
> This was not caught because the randomized testing apparently did not test for values outside the bounds of the btree. This has been fixed as well, and the tests did easily exhibit the problem without the fix.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)