[
https://issues.apache.org/jira/browse/CASSANDRA-21798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130263#comment-18130263
]
Dmitry Konstantinov edited comment on CASSANDRA-21798 at 10/22/26, 11:53 AM:
-----------------------------------------------------------------------------
When metadata epoch N is a multiple of metadata_snapshot_frequency (default
100), the cluster metadata node (node1) automatically commits a TriggerSnapshot
as epoch N+1
CREATE TABLE multipleshards.tbl was committed as exactly epoch 100
Accord treats it as a new epoch whose ranges start as not ready. A new epoch is
ready immediately only for ranges it adds; epoch 101 adds none, so it waits
until both nodes report it ready. Epoch 100 had been ready at once because it
added the table.
The test asks for the shards covering its 2 keys at epoch 101. Because 101
isn't ready yet, the lookup also pulls in epoch 100. The shard count then adds
both epochs together: 2 + 2 = 4.
Epochs log:
{code:java}
Epoch 99 CreateKeyspaceStatement (multipleshards)
Epoch 100 CreateTableStatement (multipleshards, tbl)
Epoch 101 TriggerSnapshot{} <- automatic snapshot every 100 epochs
Epoch 102 CreateTableStatement (accordtbl148) <- next test {code}
was (Author: dnk):
When metadata epoch N is a multiple of metadata_snapshot_frequency (default
100), the cluster metadata node (node1) automatically commits a TriggerSnapshot
as epoch N+1
CREATE TABLE multipleshards.tbl was committed as exactly epoch 100
Accord treats it as a new epoch whose ranges start as not ready. A new epoch is
ready immediately only for ranges it adds; epoch 101 adds none, so it waits
until both nodes report it ready. Epoch 100 had been ready at once because it
added the table.
4. The test asks for the shards covering its 2 keys at epoch 101
(AccordCQLTestBase.java:968). Because 101 isn't ready yet, the lookup also
pulls in epoch 100. The shard count then adds both epochs together: 2 + 2 = 4.
Epochs log:
{code:java}
Epoch 99 CreateKeyspaceStatement (multipleshards)
Epoch 100 CreateTableStatement (multipleshards, tbl)
Epoch 101 TriggerSnapshot{} <- automatic snapshot every 100 epochs
Epoch 102 CreateTableStatement (accordtbl148) <- next test {code}
> Test failure:
> distributed.test.accord.MixedReadAccordCQLTest::testMultipleShards
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-21798
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21798
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Accord, Test/dtest/java
> Reporter: Dmitry Konstantinov
> Assignee: Dmitry Konstantinov
> Priority: Normal
> Fix For: 6.x, 7.x
>
>
> We have a test failure on CI:
> org.apache.cassandra.distributed.test.accord.MixedReadAccordCQLTest::testMultipleShards,
> it reproduces consistently.
> {code:java}
> junit.framework.AssertionFailedError: expected:<[2]> but was:<[4]>
> at
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
> at
> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
> at
> org.apache.cassandra.distributed.test.accord.AccordCQLTestBase.lambda$testMultipleShards$6d852ed$1(AccordCQLTestBase.java:968)
> at
> org.apache.cassandra.concurrent.FutureTask$2.call(FutureTask.java:124)
> at org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
> at org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> at
> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
> at java.base/java.lang.Thread.run(Thread.java:840)
> at
> org.apache.cassandra.concurrent.CassandraThread.run(CassandraThread.java:169)
> {code}
> Example:
> https://astro-cass.ci/job/cassandra/43/testReport/junit/org.apache.cassandra.distributed.test.accord/MixedReadAccordCQLTest/Tests___jvm_dtest_jdk17_11_16___testMultipleShards__jdk17_x86_64/
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]