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

Ariel Weisberg commented on CASSANDRA-9462:
-------------------------------------------

I took the tests from the branch and ran them on trunk just to see the 
difference in what I implemented. On trunk in RangeTest these two assertions 
fail. On the branch I operated under the assumption that min() on the right is 
max() and thus it can't wrap.
{noformat}
assertFalse(makeRange(MIN, MIN).isWrapAround());
assertFalse(makeRange(3, MIN).isWrapAround());
{noformat}

There are also failures for isEmpty(). These all pass on the branch but fail on 
trunk.
{noformat}
assertFalse(AbstractBounds.isEmpty(bound(1, false), bound(1, true)));
assertFalse(AbstractBounds.isEmpty(bound(1, true), bound(MIN, false)));
assertFalse(AbstractBounds.isEmpty(bound(1, false), bound(MIN, false)));
assertFalse(AbstractBounds.isEmpty(bound(1, false), bound(MIN, true)));
assertFalse(AbstractBounds.isEmpty(bound(1, true), bound(MIN, true)));
assertFalse(AbstractBounds.isEmpty(bound(MIN, true), bound(MIN, false)));
assertFalse(AbstractBounds.isEmpty(bound(MIN, false), bound(MIN, false)));
assertFalse(AbstractBounds.isEmpty(bound(MIN, false), bound(MIN, true)));
{noformat}

I would say that this disagreement is what prompts a lot of the changes.

> ViewTest.sstableInBounds is failing
> -----------------------------------
>
>                 Key: CASSANDRA-9462
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9462
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Benedict
>            Assignee: Ariel Weisberg
>             Fix For: 3.x, 2.1.x, 2.2.x
>
>
> CASSANDRA-8568 introduced new tests to cover what was DataTracker 
> functionality in 2.1, and is now covered by the lifecycle package. This 
> particular test indicates this method does not fulfil the expected contract, 
> namely that more sstables are returned than should be.
> However while looking into it I noticed it also likely has a bug (which I 
> have not updated the test to cover) wherein a wrapped range will only yield 
> the portion at the end of the token range, not the beginning. It looks like 
> we may have call sites using this function that do not realise this, so it 
> could be a serious bug, especially for repair.



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

Reply via email to