[ 
https://issues.apache.org/jira/browse/CASSANDRA-21251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Eriksson updated CASSANDRA-21251:
----------------------------------------
    Status: Ready to Commit  (was: Review In Progress)

+1

> 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.x
>
>         Attachments: ci_summary.html, 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to