[jira] [Commented] (CASSANDRA-15670) Transient Replication: unable to insert data when the keyspace is configured with the SimpleStrategy

2020-05-14 Thread Yifan Cai (Jira)


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

Yifan Cai commented on CASSANDRA-15670:
---

Thanks [~mck] for bringing it up. 
Agree that CASSANDRA-15791 and the PR in this ticket solve the same problem, 
but using different approaches. 
Since the other one is already merged, it is a dup. 

> Transient Replication: unable to insert data when the keyspace is configured 
> with the SimpleStrategy
> 
>
> Key: CASSANDRA-15670
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15670
> Project: Cassandra
>  Issue Type: Bug
>  Components: Feature/Transient Replication
>Reporter: Alan Boudreault
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-beta
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> An error is thrown then trying to insert data with the transient replication 
> + SimpleStrategy configured.
> Test case:
> {code:java}
> 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');{code}
>  
> traceback:
> {code:java}
> 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)
>  {code}
>  
> --> 
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/ConsistencyLevel.java#L103



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15670) Transient Replication: unable to insert data when the keyspace is configured with the SimpleStrategy

2020-05-14 Thread Michael Semb Wever (Jira)


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

Michael Semb Wever commented on CASSANDRA-15670:


[~fcofdezc], [~yifanc], it looks like this bug got fixed in CASSANDRA-15791.

I took just the patch of the tests classes and applied them to trunk and both 
{{ReplicaPlansTest}} and {{ReadRepairTest}} passed.

Can we resolve this ticket as a duplicate? 

> Transient Replication: unable to insert data when the keyspace is configured 
> with the SimpleStrategy
> 
>
> Key: CASSANDRA-15670
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15670
> Project: Cassandra
>  Issue Type: Bug
>  Components: Feature/Transient Replication
>Reporter: Alan Boudreault
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-beta
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> An error is thrown then trying to insert data with the transient replication 
> + SimpleStrategy configured.
> Test case:
> {code:java}
> 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');{code}
>  
> traceback:
> {code:java}
> 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)
>  {code}
>  
> --> 
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/ConsistencyLevel.java#L103



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15670) Transient Replication: unable to insert data when the keyspace is configured with the SimpleStrategy

2020-05-11 Thread Yifan Cai (Jira)


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

Yifan Cai commented on CASSANDRA-15670:
---

Hi [~fcofdezc], thank you for the patch. 
Can you also link the CircleCI result?

> Transient Replication: unable to insert data when the keyspace is configured 
> with the SimpleStrategy
> 
>
> Key: CASSANDRA-15670
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15670
> Project: Cassandra
>  Issue Type: Bug
>  Components: Feature/Transient Replication
>Reporter: Alan Boudreault
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-beta
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> An error is thrown then trying to insert data with the transient replication 
> + SimpleStrategy configured.
> Test case:
> {code:java}
> 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');{code}
>  
> traceback:
> {code:java}
> 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)
>  {code}
>  
> --> 
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/ConsistencyLevel.java#L103



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15670) Transient Replication: unable to insert data when the keyspace is configured with the SimpleStrategy

2020-04-08 Thread Francisco Fernandez (Jira)


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

Francisco Fernandez commented on CASSANDRA-15670:
-

I've opened a PR moving the logic to calculate the write endpoints for 
transient replication to concrete ReplicationStrategy classes. That might have 
a bit of impact on performance depending on the compiler optimizations, was 
that the reason for the previous approach? 

> Transient Replication: unable to insert data when the keyspace is configured 
> with the SimpleStrategy
> 
>
> Key: CASSANDRA-15670
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15670
> Project: Cassandra
>  Issue Type: Bug
>  Components: Feature/Transient Replication
>Reporter: Alan Boudreault
>Assignee: Francisco Fernandez
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-rc
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> An error is thrown then trying to insert data with the transient replication 
> + SimpleStrategy configured.
> Test case:
> {code:java}
> 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');{code}
>  
> traceback:
> {code:java}
> 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)
>  {code}
>  
> --> 
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/ConsistencyLevel.java#L103



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org