Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Duplicate
-
Code - Bug - Unclear Impact
-
Normal
-
Normal
-
User Report
-
All
-
None
-
Description
An error is thrown then trying to insert data with the transient replication + SimpleStrategy configured.
Test case:
CREATE KEYSPACE test_tr WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3/1'}; CREATE TABLE test_tr.users (id int PRIMARY KEY, username text) with read_repair ='NONE'; INSERT INTO test_tr.users (id, username) VALUES (1, 'alan');
traceback:
ERROR [Native-Transport-Requests-8] 2020-03-27 10:27:17,188 ErrorMessage.java:450 - Unexpected exception during request java.lang.ClassCastException: org.apache.cassandra.locator.SimpleStrategy cannot be cast to org.apache.cassandra.locator.NetworkTopologyStrategy at org.apache.cassandra.db.ConsistencyLevel.eachQuorumForRead(ConsistencyLevel.java:103) at org.apache.cassandra.db.ConsistencyLevel.eachQuorumForWrite(ConsistencyLevel.java:112) at org.apache.cassandra.locator.ReplicaPlans$2.select(ReplicaPlans.java:409) at org.apache.cassandra.locator.ReplicaPlans.forWrite(ReplicaPlans.java:353) at org.apache.cassandra.locator.ReplicaPlans.forWrite(ReplicaPlans.java:348) at org.apache.cassandra.locator.ReplicaPlans.forWrite(ReplicaPlans.java:341) at org.apache.cassandra.locator.ReplicaPlans.forWrite(ReplicaPlans.java:330) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:1171) at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:713) at org.apache.cassandra.service.StorageProxy.mutateWithTriggers(StorageProxy.java:951) at org.apache.cassandra.cql3.statements.ModificationStatement.executeWithoutCondition(ModificationStatement.java:475) at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:453) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:216) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:247) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:233) at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:108) at org.apache.cassandra.transport.Message$Request.execute(Message.java:253) at org.apache.cassandra.transport.Message$Dispatcher.processRequest(Message.java:725) at org.apache.cassandra.transport.Message$Dispatcher.lambda$channelRead0$0(Message.java:630) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:165) at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:119) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748)
Attachments
Issue Links
- duplicates
-
CASSANDRA-15791 dtest.consistency_test/TestAccuracy/test_simple_strategy_each_quorum_counters/
- Resolved
- links to