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

Hudson commented on CASSANDRA-3084:
-----------------------------------

Integrated in Cassandra-0.8 #300 (See 
[https://builds.apache.org/job/Cassandra-0.8/300/])
    fix corner cases in Range.differenceToFetch
patch by Tyler Hobbs; reviewed by Stu Hood for CASSANDRA-3084

jbellis : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163090
Files : 
* /cassandra/branches/cassandra-0.8/CHANGES.txt
* /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/dht/Range.java
* 
/cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/dht/RangeTest.java


> o.a.c.dht.Range.differenceToFetch() doesn't handle all cases correctly
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-3084
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3084
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.4
>            Reporter: Tyler Hobbs
>            Assignee: Tyler Hobbs
>             Fix For: 0.8.5
>
>         Attachments: 3084-unit-test.txt, 3084-v2.txt, 3084.txt
>
>
> It's possible that differenceToFetch is making implicit assumptions about the 
> relationship between the two ranges, but the following cases are not handled 
> correctly (the old range is (A, B], the new is (C, D]:
> {noformat}
> --C--A-----B--D--
> {noformat}
> Here, the result will be (C, A] and (D, B], instead of (C, A] and (B, D].
> {noformat}
> --C--A-----D--B--
> {noformat}
> The result will be (C, D] instead of just (C, A].
> {noformat}
> --A--C-----D--B--
> {noformat}
> The result will be (B, D] when nothing needs to be transfered.
> If there is some kind of implicit assumption that these cases won't arise, it 
> either needs to be explicit (assertions, exceptions) or the cases need to be 
> handled.  It should be easy to cover this with unit tests.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to