You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jon Meredith (Jira)" <ji...@apache.org> on 2022/01/13 17:50:00 UTC
[jira] [Commented] (CASSANDRA-16673) Avoid race in AbstractReplicationStrategy endpoint caching
[ https://issues.apache.org/jira/browse/CASSANDRA-16673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475569#comment-17475569 ]
Jon Meredith commented on CASSANDRA-16673:
------------------------------------------
+1
There's still a pending nit about {{cloneWithNewPartitioner}} not copying the ring version, and up to you if you'd like to add the stress test as well [https://github.com/jonmeredith/cassandra/commit/349694482456b0bdbbd33cf2076b4c410a77cf78] (though the imports look like they need a cleanup)
Looks like this race has been here since natural endpoint caching was introduced - so fix from 3.0 and up?
> Avoid race in AbstractReplicationStrategy endpoint caching
> ----------------------------------------------------------
>
> Key: CASSANDRA-16673
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16673
> Project: Cassandra
> Issue Type: Bug
> Components: Cluster/Membership
> Reporter: Marcus Eriksson
> Assignee: Marcus Eriksson
> Priority: Normal
>
> We should make sure we track which ringVersion we are caching in AbstractReplicationStrategy to avoid a race where we might return the wrong EndpointsForRange.
> {code}
> Caused by: java.lang.IllegalArgumentException: 9010454139840013625 is not contained within (9223372036854775801,-4611686018427387905]
> at org.apache.cassandra.locator.EndpointsForRange.forToken(EndpointsForRange.java:59)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalReplicasForToken(AbstractReplicationStrategy.java:104)
> at org.apache.cassandra.locator.ReplicaLayout.forTokenReadLiveSorted(ReplicaLayout.java:330)
> at org.apache.cassandra.locator.ReplicaPlans.forRead(ReplicaPlans.java:594)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org