cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10254) 3.0 paging states are incompatible with pre-3.0 nodes
Date Thu, 03 Sep 2015 14:18:47 GMT

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

Sylvain Lebresne commented on CASSANDRA-10254:
----------------------------------------------

That's not a 2.1/2.2 error, it's a 3.0 backward compatibility issue. Basically, 3.0 changes
a bit what it stores in the paging state (it uses only the clustering while 2.1/2.2 have a
full "cell name"), and while the code was made so 3.0 node can read paging state from pre-3.0
nodes, the reverse isn't true and that is a problem for mixed-version clusters.

So we need to allow 3.0 node to generate backward compatibles paging state. The thing is however
that while that is doable, it's also somewhat inefficient to do so for 3.0 nodes, so while
we should generate such backward compatibille paging state, we should also have an upgrade
path so that once your full cluster is on 3.0, you don't have to bother anymore.

And the most viable way to do that I can think is to say that paging state are native protocol
dependent and a given state shouldn't been use between protocol version. In other words, we'll
maintain the backward compatible paging states for the native protocol v3, but on v4 we'll
use the current more simple and efficient version. That does mean a driver that simultaneously
connect to nodes with different protocol version will have to careful with this, but 1) it
sounds reasonably fair and 2) at least the java drivers (and I'm sure other drivers) doesn't
support talking simultaneously to node with different protocol version so that's not a problem.


> 3.0 paging states are incompatible with pre-3.0 nodes
> -----------------------------------------------------
>
>                 Key: CASSANDRA-10254
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10254
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Blake Eggleston
>             Fix For: 3.0.0 rc1
>
>
> When running the upgrade dtest {{TestCQL.static_columns_with_distinct_test}}, the client
appears to be passing in an invalid paging state (no cell name). Instead of catching the problem
in validation and returning an error to the client, the select statement tries to run it,
causing this exception:
> {noformat}
> ERROR QueryMessage.java:135 - Unexpected error during query
> java.lang.ClassCastException: org.apache.cassandra.db.composites.Composites$EmptyComposite
cannot be cast to org.apache.cassandra.db.composites.CellName
> 	at org.apache.cassandra.service.pager.SliceQueryPager.<init>(SliceQueryPager.java:64)
~[main/:na]
> 	at org.apache.cassandra.service.pager.MultiPartitionPager.makePager(MultiPartitionPager.java:93)
~[main/:na]
> 	at org.apache.cassandra.service.pager.MultiPartitionPager.<init>(MultiPartitionPager.java:75)
~[main/:na]
> 	at org.apache.cassandra.service.pager.QueryPagers.pager(QueryPagers.java:102) ~[main/:na]
> 	at org.apache.cassandra.service.pager.QueryPagers.pager(QueryPagers.java:126) ~[main/:na]
> 	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:228)
~[main/:na]
> 	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:67)
~[main/:na]
> 	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:238)
~[main/:na]
> 	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:260) ~[main/:na]
> 	at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:122)
~[main/:na]
> 	at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439)
[main/:na]
> 	at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335)
[main/:na]
> 	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
[netty-all-4.0.23.Final.jar:4.0.23.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[netty-all-4.0.23.Final.jar:4.0.23.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
[netty-all-4.0.23.Final.jar:4.0.23.Final]
> 	at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324)
[netty-all-4.0.23.Final.jar:4.0.23.Final]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_40]
> 	at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
[main/:na]
> 	at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [main/:na]
> 	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
> {noformat}
> Running {code} UPGRADE_MODE=none nosetests upgrade_tests/cql_tests.py:TestCQL.static_columns_with_distinct_test{code}
should cause the error.



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

Mime
View raw message