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/06/24 13:23:00 UTC

[jira] [Comment Edited] (CASSANDRA-21251) Transient mismatching partitioner error when querying legacy 2i index

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

Sam Tunnicliffe edited comment on CASSANDRA-21251 at 6/24/26 1:22 PM:
----------------------------------------------------------------------

Sorry, this got a bit delayed. I've rebased and re-run CI, which looks reasonable (no new/unexplained failures).


was (Author: beobal):
Sorry, this got a delayed. I've rebased and re-run CI, which looks reasonable (no new/unexplained failures).

> 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
>            Priority: Normal
>             Fix For: 6.0-alpha2
>
>         Attachments: ci_summary-1.html, ci_summary.html, result_details.tar-1.gz, result_details.tar.gz
>
>
> 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