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

Stefania commented on CASSANDRA-10002:
--------------------------------------

Code change is +1. 

You may want to use parentheses consistently for these two lines although it is 
not required for correctness:

{code}
final int start = nextIdx + (-searchResult - 1);
[...]
final int end = start + -searchResult - 1;
{code}


> Repeated slices on RowSearchers are incorrect
> ---------------------------------------------
>
>                 Key: CASSANDRA-10002
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10002
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tyler Hobbs
>            Assignee: Tyler Hobbs
>             Fix For: 3.0 beta 1
>
>
> In {{AbstractThreadUnsafePartition}}, repeated {{slice()}} calls on a 
> {{RowSearcher}} can produce incorrect results.  This is caused by only 
> performing a binary search over a sublist (based on {{nextIdx}}), but not 
> taking {{nextIdx}} into account when using the search result index.
> I made a quick fix in [this 
> commit|https://github.com/thobbs/cassandra/commit/73725ea6825c9c0da1fa4986b01f39ae08130e10]
>  on one of my branches, but the full fix also needs to cover 
> {{ReverseRowSearcher}} and include a test to reproduce the issue.



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

Reply via email to