cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksandr Sorokoumov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring
Date Tue, 13 Nov 2018 17:33:00 GMT

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

Aleksandr Sorokoumov commented on CASSANDRA-14869:
--------------------------------------------------

Thanks for the review! I've fixed the patches according to your suggestions.

{quote}
Make sure full range subtraction is covered, like range(0,0).subtract(range(1,1)) should be
empty
{quote}

I believe this case is covered by [that test|https://github.com/Gerrrr/cassandra/commit/9e4afefa1dd892a22197c7296ec1d9cd13ad5ae0#diff-5b7f5ad57ef5c28db2566ce381294b0dR404].





> Range.subtractContained produces incorrect results when used on full ring
> -------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14869
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14869
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Aleksandr Sorokoumov
>            Assignee: Aleksandr Sorokoumov
>            Priority: Major
>             Fix For: 3.0.x, 3.11.x, 4.0.x
>
>         Attachments: range bug.jpg
>
>
> Currently {{Range.subtractContained}} returns incorrect results if minuend range covers
full ring and:
> * subtrahend range wraps around. For example, {{(50, 50] - (10, 100]}} returns {{\{(50,10],
(100,50]\}}} instead of {{(100,10]}}
> * subtrahend range covers the full ring as well. For example {{(50, 50] - (0, 0]}} returns
{{\{(0,50], (50,0]\}}} instead of {{\{\}}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message