[
https://issues.apache.org/jira/browse/CASSANDRA-15946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17178054#comment-17178054
]
David Capwell edited comment on CASSANDRA-15946 at 8/15/20, 1:12 AM:
---------------------------------------------------------------------
Very simple to replicate with
{code}
@Test
public void test() throws Exception
{
Versions versions = Versions.find();
try (Cluster cluster = init(builder()
.withNodes(2)
.withVersion(versions.getLatest(Versions.Major.v30))
.withConfig(c -> c.with(Feature.GOSSIP,
Feature.NATIVE_PROTOCOL, Feature.NETWORK))
.start()))
{
cluster.schemaChange(withKeyspace("CREATE TABLE %s.tbl (pk int
primary key)"));
cluster.get(2).shutdown().get();
((IUpgradeableInstance)
cluster.get(2)).setVersion(versions.getLatest(Versions.Major.v4));
cluster.get(2).startup();
System.err.println("Doing insert");
cluster.coordinator(1).execute(withKeyspace("INSERT INTO %s.tbl
(pk) VALUES (?)"), ConsistencyLevel.ALL, 0);
cluster.get(1).executeInternal(withKeyspace("INSERT INTO %s.tbl
(pk) VALUES (?)"), 1);
System.err.println("Doing query");
SimpleQueryResult qr =
cluster.coordinator(2).executeWithResult(withKeyspace("SELECT * FROM %s.tbl"),
ConsistencyLevel.ALL);
AssertUtils.assertRows(qr, QueryResults.builder()
.row(1)
.row(0)
.build());
}
}
{code}
I don't do any writes, so this patch doesn't fix the messages being sent.
was (Author: dcapwell):
Very simple to replicate with
{code}
public class MixModeLongLiveTest extends TestBaseImpl
{
@Test
public void test() throws Exception
{
Versions versions = Versions.find();
try (Cluster cluster = init(builder()
.withNodes(2)
.withVersion(versions.getLatest(Versions.Major.v30))
.withConfig(c -> c.with(Feature.GOSSIP,
Feature.NATIVE_PROTOCOL, Feature.NETWORK))
.start()))
{
cluster.schemaChange(withKeyspace("CREATE TABLE %s.tbl (pk int
primary key)"));
cluster.get(2).shutdown().get();
((IUpgradeableInstance)
cluster.get(2)).setVersion(versions.getLatest(Versions.Major.v4));
cluster.get(2).startup();
System.err.println("Doing insert");
cluster.coordinator(1).execute(withKeyspace("INSERT INTO %s.tbl
(pk) VALUES (?)"), ConsistencyLevel.ALL, 0);
cluster.get(1).executeInternal(withKeyspace("INSERT INTO %s.tbl
(pk) VALUES (?)"), 1);
System.err.println("Doing query");
SimpleQueryResult qr =
cluster.coordinator(2).executeWithResult(withKeyspace("SELECT * FROM %s.tbl"),
ConsistencyLevel.ALL);
AssertUtils.assertRows(qr, QueryResults.builder()
.row(0)
.row(1)
.build());
}
}
}
{code}
I don't do any writes, so this patch doesn't fix the messages being sent.
> NPE when sending REQUEST_RSP from 3.0 to 4.0 in in-jvm dtests
> -------------------------------------------------------------
>
> Key: CASSANDRA-15946
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15946
> Project: Cassandra
> Issue Type: Bug
> Components: Test/dtest
> Reporter: Jacek Lewandowski
> Assignee: Jacek Lewandowski
> Priority: Normal
>
> There is a communication problem when testing upgrades using in-JVM dtest
> between Cassandra 3 and 4.
> In a method {{registerInboundFilter}} of {{Instance}}, we get a message which
> was just received and we prepare it for filtering as part of which, we
> serialize the payload again. This is fine when dealing with incoming
> Cassandra 4 message, because we can serialize it. However when we get the
> Cassandra 3 message, which uses a different protocol, and we get something
> like {{REQUEST_RSP}}, we can surely deserialize it through some special
> deserialization path, but we cannot serialize the payload for it as there is
> no serializer defined for {{REQUEST_RSP}} - no wonder, why would Cassandra
> 4.0 need to be able to serialize Cassandra 3.0 payloads?
> {code}
> java.lang.NullPointerException: null
> at
> org.apache.cassandra.net.Message$Serializer.serializePost40(Message.java:760)
> at
> org.apache.cassandra.net.Message$Serializer.serialize(Message.java:618)
> at
> org.apache.cassandra.distributed.impl.Instance.serializeMessage(Instance.java:267)
> at
> org.apache.cassandra.distributed.impl.Instance.lambda$registerInboundFilter$4(Instance.java:234)
> at
> org.apache.cassandra.net.InboundSink$Filtered.accept(InboundSink.java:62)
> at
> org.apache.cassandra.net.InboundSink$Filtered.accept(InboundSink.java:49)
> at org.apache.cassandra.net.InboundSink.accept(InboundSink.java:93)
> at
> org.apache.cassandra.distributed.impl.Instance.lambda$null$6(Instance.java:305)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at
> org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:165)
> at
> org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:137)
> at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:119)
> at
> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
> at java.lang.Thread.run(Thread.java:748)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]