Bug: Test Failure: org.apache.cassandra.distributed.upgrade.MixedModeFrom3ReplicationTest.testSimpleStrategy
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 18/May/22 17:02
Resolved: 30/Jun/22 23:23

The upgrade in-JVM dtest {{org.apache.cassandra.distributed.upgrade.MixedModeFrom3ReplicationTest.testSimpleStrategy}} is flaky on 4.1 and trunk.

Jenkins failure:
https://ci-cassandra.apache.org/job/Cassandra-4.1/21/testReport/org.apache.cassandra.distributed.upgrade/MixedModeFrom3UnloggedBatchTest/testSimpleStrategy/
https://ci-cassandra.apache.org/job/Cassandra-trunk/1149/testReport/org.apache.cassandra.distributed.upgrade/MixedModeFrom3ReplicationTest/testSimpleStrategy_2/

Circle failure:
https://app.circleci.com/pipelines/github/adelapena/cassandra/1564/workflows/e8dbd50a-d574-4ef8-a741-795a93cd3e85/jobs/16725

Error Message:
{code}
Uncaught exceptions were thrown during test
{code}

Stacktrace:
{code}
org.apache.cassandra.distributed.shared.ShutdownException: Uncaught exceptions were thrown during test
	at org.apache.cassandra.distributed.impl.AbstractCluster.checkAndResetUncaughtExceptions(AbstractCluster.java:1056)
	at org.apache.cassandra.distributed.impl.AbstractCluster.close(AbstractCluster.java:1042)
	at org.apache.cassandra.distributed.upgrade.UpgradeTestBase$TestCase.run(UpgradeTestBase.java:239)
	at org.apache.cassandra.distributed.upgrade.MixedModeBatchTestBase.testSimpleStrategy(MixedModeBatchTestBase.java:78)
	at org.apache.cassandra.distributed.upgrade.MixedModeBatchTestBase.testSimpleStrategy(MixedModeBatchTestBase.java:48)
	at org.apache.cassandra.distributed.upgrade.MixedModeFrom3UnloggedBatchTest.testSimpleStrategy(MixedModeFrom3UnloggedBatchTest.java:36)
	Suppressed: java.lang.RuntimeException: java.lang.AssertionError
		at org.apache.cassandra.net.InboundSink.accept(InboundSink.java:108)
		at org.apache.cassandra.distributed.impl.Instance.lambda$null$6(Instance.java:495)
		at org.apache.cassandra.concurrent.ExecutionFailure$1.run(ExecutionFailure.java:124)
		at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:120)
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: java.lang.AssertionError
		at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:1171)
		at org.apache.cassandra.locator.TokenMetadata.firstToken(TokenMetadata.java:1185)
		at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalReplicas(AbstractReplicationStrategy.java:95)
		at org.apache.cassandra.locator.AbstractReplicationStrategy.getLocalReplicaFor(AbstractReplicationStrategy.java:111)
		at org.apache.cassandra.db.ReadCommandVerbHandler.validateTransientStatus(ReadCommandVerbHandler.java:108)
		at org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:50)
		at org.apache.cassandra.net.InboundSink.lambda$new$0(InboundSink.java:78)
		at org.apache.cassandra.net.InboundSink.accept(InboundSink.java:97)
	Suppressed: java.lang.RuntimeException: java.lang.AssertionError
		at org.apache.cassandra.net.InboundSink.accept(InboundSink.java:108)
		at org.apache.cassandra.distributed.impl.Instance.lambda$null$6(Instance.java:495)
		at org.apache.cassandra.concurrent.ExecutionFailure$1.run(ExecutionFailure.java:124)
		at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:120)
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: java.lang.AssertionError
		at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:1171)
		at org.apache.cassandra.locator.TokenMetadata.firstToken(TokenMetadata.java:1185)
		at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalReplicas(AbstractReplicationStrategy.java:95)
		at org.apache.cassandra.locator.AbstractReplicationStrategy.getLocalReplicaFor(AbstractReplicationStrategy.java:111)
		at org.apache.cassandra.db.ReadCommandVerbHandler.validateTransientStatus(ReadCommandVerbHandler.java:108)
		at org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:50)
		at org.apache.cassandra.net.InboundSink.lambda$new$0(InboundSink.java:78)
		at org.apache.cassandra.net.InboundSink.accept(InboundSink.java:97)
{code}