[jira] [Comment Edited] (CASSANDRA-14910) Don't skip entire sstables when reading backwards with mixed clustering column order

2018-11-27 Thread Alex Petrov (JIRA)


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

Alex Petrov edited comment on CASSANDRA-14910 at 11/27/18 11:10 AM:


The new version looks much better, the only thing is that current tests do not 
cover 
[this|https://github.com/apache/cassandra/compare/trunk...iamaleksey:14910-2.2#diff-82e58a7c5bec8818f2e88a982725690fR113]
 part (e.g. {{compare}} is now not called on static bounds since we're 
returning {{true}} before calling {{intersect}} which would invoke comparator), 
so while I'm not saying that the change is wrong, I'm not 100% sure if we 
should keep it unless we have a test or at least an example scenario where this 
one is required. Can you comment on where we need it?

UPDATE: I've ran some more tests and so far could only land into {{comparison 
!= null}} clause but couldn't do it with static bounds.


was (Author: ifesdjeen):
The new version looks much better, the only thing is that current tests do not 
cover 
[this|https://github.com/apache/cassandra/compare/trunk...iamaleksey:14910-2.2#diff-82e58a7c5bec8818f2e88a982725690fR113]
 part (e.g. {{compare}} is now not called on static bounds since we're 
returning {{true}} before calling {{intersect}} which would invoke comparator), 
so while I'm not saying that the change is wrong, I'm not 100% sure if we 
should keep it unless we have a test or at least an example scenario where this 
one is required. Can you comment on where we need it?

> Don't skip entire sstables when reading backwards with mixed clustering 
> column order
> 
>
> Key: CASSANDRA-14910
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14910
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 2.2.x
>
>
> In 2.x, if a table has clustering columns in {{DESC}} order, any SSTable that 
> doesn’t have any static rows in it will be skipped altogether when iterated 
> in reverse.
> This occurs due to the logic in {{ColumnSlice.compare()}} errorneusly sorting 
> any empty {{ByteBuffer}} after non-empty values due to the way 
> {{ReversedType}} operates. In case that empty {{ByteBuffer}} is coming from a 
> static {{Composite}}, however, the logic breaks down. Static {{Composite}} 
> components must *always* sort before any non-empty value, no matter the 
> table’s comparator.
> 2.0, 2.1, and 2.2 are all affected. 3.0 isn’t, but only because we skip slice 
> intersection logic entirely if static rows are present in the filter.
> Introduced by CASSANDRA-8502.



--
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] [Comment Edited] (CASSANDRA-14910) Don't skip entire sstables when reading backwards with mixed clustering column order

2018-11-27 Thread Alex Petrov (JIRA)


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

Alex Petrov edited comment on CASSANDRA-14910 at 11/27/18 10:50 AM:


The new version looks much better, the only thing is that current tests do not 
cover 
[this|https://github.com/apache/cassandra/compare/trunk...iamaleksey:14910-2.2#diff-82e58a7c5bec8818f2e88a982725690fR113]
 part (e.g. {{compare}} is now not called on static bounds since we're 
returning {{true}} before calling {{intersect}} which would invoke comparator), 
so while I'm not saying that the change is wrong, I'm not 100% sure if we 
should keep it unless we have a test or at least an example scenario where this 
one is required. Can you comment on where we need it?


was (Author: ifesdjeen):
The new version looks much better, the only thing is that current tests do not 
cover 
[this|https://github.com/apache/cassandra/compare/trunk...iamaleksey:14910-2.2#diff-82e58a7c5bec8818f2e88a982725690fR113]
 part (e.g. {{compare}} is now not called on static bounds), so while I'm not 
saying that the change is wrong, I'm not 100% sure if we should keep it unless 
we have a test or at least an example scenario where this one is required. Can 
you comment on where we need it?

> Don't skip entire sstables when reading backwards with mixed clustering 
> column order
> 
>
> Key: CASSANDRA-14910
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14910
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 2.2.x
>
>
> In 2.x, if a table has clustering columns in {{DESC}} order, any SSTable that 
> doesn’t have any static rows in it will be skipped altogether when iterated 
> in reverse.
> This occurs due to the logic in {{ColumnSlice.compare()}} errorneusly sorting 
> any empty {{ByteBuffer}} after non-empty values due to the way 
> {{ReversedType}} operates. In case that empty {{ByteBuffer}} is coming from a 
> static {{Composite}}, however, the logic breaks down. Static {{Composite}} 
> components must *always* sort before any non-empty value, no matter the 
> table’s comparator.
> 2.0, 2.1, and 2.2 are all affected. 3.0 isn’t, but only because we skip slice 
> intersection logic entirely if static rows are present in the filter.
> Introduced by CASSANDRA-8502.



--
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] [Comment Edited] (CASSANDRA-14910) Don't skip entire sstables when reading backwards with mixed clustering column order

2018-11-26 Thread Aleksey Yeschenko (JIRA)


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

Aleksey Yeschenko edited comment on CASSANDRA-14910 at 11/26/18 2:24 PM:
-

Code [here|https://github.com/iamaleksey/cassandra/commits/14910-2.2], CI 
[here|https://circleci.com/workflow-run/0c915d7b-e94a-4c47-b604-9f938e659b28].


was (Author: iamaleksey):
Code [here|https://github.com/iamaleksey/cassandra/commits/14910-2.2], CI 
[here|https://circleci.com/workflow-run/08fbce09-e965-4909-9fcc-74c0f3893230].

> Don't skip entire sstables when reading backwards with mixed clustering 
> column order
> 
>
> Key: CASSANDRA-14910
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14910
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 2.2.x
>
>
> In 2.x, if a table has clustering columns in {{DESC}} order, any SSTable that 
> doesn’t have any static rows in it will be skipped altogether when iterated 
> in reverse.
> This occurs due to the logic in {{ColumnSlice.compare()}} errorneusly sorting 
> any empty {{ByteBuffer}} after non-empty values due to the way 
> {{ReversedType}} operates. In case that empty {{ByteBuffer}} is coming from a 
> static {{Composite}}, however, the logic breaks down. Static {{Composite}} 
> components must *always* sort before any non-empty value, no matter the 
> table’s comparator.
> 2.0, 2.1, and 2.2 are all affected. 3.0 isn’t, but only because we skip slice 
> intersection logic entirely if static rows are present in the filter.
> Introduced by CASSANDRA-8502.



--
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] [Comment Edited] (CASSANDRA-14910) Don't skip entire sstables when reading backwards with mixed clustering column order

2018-11-23 Thread Aleksey Yeschenko (JIRA)


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

Aleksey Yeschenko edited comment on CASSANDRA-14910 at 11/23/18 2:14 PM:
-

Code [here|https://github.com/iamaleksey/cassandra/commits/14910-2.2], CI 
[here|https://circleci.com/workflow-run/08fbce09-e965-4909-9fcc-74c0f3893230].


was (Author: iamaleksey):
Code [here|https://github.com/iamaleksey/cassandra/commits/14910-2.2], CI 
[here|https://circleci.com/workflow-run/fed811d6-03d4-411d-9091-ff1e2b89d56f].

> Don't skip entire sstables when reading backwards with mixed clustering 
> column order
> 
>
> Key: CASSANDRA-14910
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14910
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 2.2.x
>
>
> In 2.x, if a table has clustering columns in {{DESC}} order, any SSTable that 
> doesn’t have any static rows in it will be skipped altogether when iterated 
> in reverse.
> This occurs due to the logic in {{ColumnSlice.compare()}} errorneusly sorting 
> any empty {{ByteBuffer}} after non-empty values due to the way 
> {{ReversedType}} operates. In case that empty {{ByteBuffer}} is coming from a 
> static {{Composite}}, however, the logic breaks down. Static {{Composite}} 
> components must *always* sort before any non-empty value, no matter the 
> table’s comparator.
> 2.0, 2.1, and 2.2 are all affected. 3.0 isn’t, but only because we skip slice 
> intersection logic entirely if static rows are present in the filter.
> Introduced by CASSANDRA-8502.



--
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