You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sam Tunnicliffe (Jira)" <ji...@apache.org> on 2026/03/25 10:09:00 UTC
[jira] [Created] (CASSANDRA-21251) Transient mismatching partitioner error when querying legacy 2i index
Sam Tunnicliffe created CASSANDRA-21251:
-------------------------------------------
Summary: Transient mismatching partitioner error when querying legacy 2i index
Key: CASSANDRA-21251
URL: https://issues.apache.org/jira/browse/CASSANDRA-21251
Project: Apache Cassandra
Issue Type: Bug
Components: Feature/2i Index, Transactional Cluster Metadata
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
When a {{ClusterMetadata}} snapshot is applied, either during catchup from a peer or when the CMS is first initialized after upgrade, the {{TableMetadata}} of legacy 2i tables are reconstructed, using a new instance of {{{}LocalPartitioner{}}}.
If this occurs concurrently with in-flight 2i queries, it can lead to a race which may trigger the assertion in the {{SinglePartitionReadCommand}} constructor to fail, resulting in a transient error to the client. There is no permanent effect and subsequent requests will succeed as normal.
Example Stacktrace:
{code:java}
Caused by: java.lang.AssertionError
at org.apache.cassandra.db.SinglePartitionReadCommand.<init>(SinglePartitionReadCommand.java:117)
at org.apache.cassandra.db.SinglePartitionReadCommand.create(SinglePartitionReadCommand.java:157)
at org.apache.cassandra.db.SinglePartitionReadCommand.create(SinglePartitionReadCommand.java:196)
at org.apache.cassandra.db.SinglePartitionReadCommand.create(SinglePartitionReadCommand.java:232)
at org.apache.cassandra.db.SinglePartitionReadCommand.create(SinglePartitionReadCommand.java:259)
at org.apache.cassandra.index.internal.CassandraIndexSearcher.queryIndex$original$RNhtC7fd(CassandraIndexSearcher.java:101)
at org.apache.cassandra.index.internal.CassandraIndexSearcher.queryIndex$original$RNhtC7fd$accessor$6QjMuAM9(CassandraIndexSearcher.java)
at org.apache.cassandra.index.internal.CassandraIndexSearcher$auxiliary$cKsJOYZj.call(Unknown Source)
at org.apache.cassandra.distributed.test.tcm.IndexTablePartitionerAfterForceSnapshotTest$BBInterceptor.queryIndex(IndexTablePartitionerAfterForceSnapshotTest.java:136)
at org.apache.cassandra.index.internal.CassandraIndexSearcher.queryIndex(CassandraIndexSearcher.java)
at org.apache.cassandra.index.internal.CassandraIndexSearcher.search(CassandraIndexSearcher.java:84)
at org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:495)
at org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:72)
... 10 more
{code}
The solution is probably to simply weaken the assertion slightly to verify equivalence rather than object equality. We could memoize {{LocalPartitioner}} instances like we do with the other partitioner types, but that would be way more invasive and provide minimal benefit.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org