[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-19 Thread Alex Petrov (JIRA)


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

Alex Petrov commented on CASSANDRA-14869:
-

[~Ge] thank you for the patch!

Committed to 
[3.0|https://git1-us-west.apache.org/repos/asf?p=cassandra.git;a=commit;h=c6f822c2a07e0e7c8e4af72523fe62d181c71e56]
 and merged up to 
[3.11|https://git1-us-west.apache.org/repos/asf?p=cassandra.git;a=commit;h=78c7d57ebb28ac688cd287d7d8b8f483a99d0135]
 and 
[trunk|https://git1-us-west.apache.org/repos/asf?p=cassandra.git;a=commit;h=13108037177a30e103a84bca5dadb38d1c090453].

> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-16 Thread Alex Petrov (JIRA)


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

Alex Petrov commented on CASSANDRA-14869:
-

Builds: 

|[3.0|https://circleci.com/workflow-run/dec6ad52-121f-4bd6-92f9-95d52b041ec9]|[3.11|https://circleci.com/workflow-run/02340ed3-5b7f-4e8e-a51f-2192cdd93612]|[trunk|https://circleci.com/workflow-run/7de63da3-3977-4ace-aeef-be5430b9bc37]|

> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-16 Thread Aleksandr Sorokoumov (JIRA)


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

Aleksandr Sorokoumov commented on CASSANDRA-14869:
--

[~ifesdjeen] Thanks for running the builds! I've tested all failing tests 
locally on {{cassandra-3.0}} and {{trunk}} right before my commit and they 
still fail in the same way.

> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-15 Thread Alex Petrov (JIRA)


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

Alex Petrov commented on CASSANDRA-14869:
-

[~jjirsa] sure; I did trigger tests as I wrote the comment.

[~Ge] looks like there's a failure in unit tests: 
https://circleci.com/gh/ifesdjeen/cassandra/782

> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-14 Thread Jeff Jirsa (JIRA)


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

Jeff Jirsa commented on CASSANDRA-14869:


([~ifesdjeen], you could just push it into a branch and run it through circleci 
just to have a passing dtest link for posterity)




> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-14 Thread Alex Petrov (JIRA)


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

Alex Petrov commented on CASSANDRA-14869:
-

Did you run dtests results for this change across all branches?

> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-13 Thread Aleksandr Sorokoumov (JIRA)


[ 
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/Ge/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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-12 Thread Alex Petrov (JIRA)


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

Alex Petrov commented on CASSANDRA-14869:
-

Several remarks: 
  * I would extract [this 
check|https://github.com/Ge/cassandra/commit/f92047ab378062e58d02d7f57e0694ba2e3c90a7#diff-b6aa8cb091f4de56555d650df9db6ca6R282]
 to {{isFull}} method.
  * Maybe add tests for {{subtract}} also not only {{subtractAll}}
  * Make sure full range subtraction is covered, like 
{{range(0,0).subtract(range(1,1))}} should be empty
  * Still mention of ArrayList 
[here|https://github.com/Ge/cassandra/commit/f92047ab378062e58d02d7f57e0694ba2e3c90a7#diff-b6aa8cb091f4de56555d650df9db6ca6R277]
 

> 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
>
>
> The bug is in the way {{Range.subtractContained}} works if minuend range 
> covers the full ring and subtrahend range goes over 0 (see illustration). For 
> example, {{(50, 50] - (10, 100]}} returns \{{{(50,10], (100,50]}}} instead of 
> \{{(100,10]}}.



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

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



[jira] [Commented] (CASSANDRA-14869) Range.subtractContained produces incorrect results when used on full ring

2018-11-06 Thread Aleksandr Sorokoumov (JIRA)


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

Aleksandr Sorokoumov commented on CASSANDRA-14869:
--

Patches:
* [3.0 | https://github.com/Ge/cassandra/tree/14869-3.0]
* [3.11 | https://github.com/Ge/cassandra/tree/14869-3.11]
* [4.0 | https://github.com/Ge/cassandra/tree/14869-4.0]

> 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
>Reporter: Aleksandr Sorokoumov
>Assignee: Aleksandr Sorokoumov
>Priority: Major
> Fix For: 3.0.x, 3.11.x, 4.0.x
>
> Attachments: range bug.jpg
>
>
> The bug is in the way {{Range.subtractContained}} works if minuend range 
> covers the full ring and subtrahend range goes over 0 (see illustration). For 
> example, {{(-50, 50] - (10, 100]}} returns \{{{(50,10], (100,50]}}} instead 
> of \{{(100,10]}}.



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

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