cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CASSANDRA-9620) Write timeout error for batch request gives wrong consistency
Date Thu, 19 Nov 2015 16:02:11 GMT

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

Aleksey Yeschenko resolved CASSANDRA-9620.
------------------------------------------
       Resolution: Not A Problem
    Reproduced In: 2.2.0 rc1, 2.1.5  (was: 2.1.5, 2.2.0 rc1)

Ultimately a driver logging issue, as C* is sending all the required information.

> Write timeout error for batch request gives wrong consistency
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-9620
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9620
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jorge Bay
>
> In case there is a write time out error when executing a batch with a consistency higher
than ONE, error information returned is incorrect:
> {{"Cassandra timeout during write query at consistency ONE (0 replica(s) acknowledged
the write over 1 required"}}
> *Consistency is always ONE and required acks is always 1*.
> To reproduce (pseudo-code):
> {code:java}
> //create a 2 node cluster
> createTwoNodeCluster();
> var session = cluster.connect();
> session.execute("create keyspace ks1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor'
: 2}");
> session.execute("create table ks1.tbl1 (k text primary key, i int)");
> session.execute(new SimpleStatement("INSERT INTO ks1.tbl1 (k, i) VALUES ('one', 1)").setConsistencyLevel(ConsistencyLevel.ALL));
> //Stop the second node
> stopNode2();
> var batch = new BatchStatement();
> batch.add(new SimpleStatement("INSERT INTO ks1.tbl1 (k, i) VALUES ('two', 2)"));
> batch.add(new SimpleStatement("INSERT INTO ks1.tbl1 (k, i) VALUES ('three', 3)"));
> //This line will throw a WriteTimeoutException with a wrong consistency
> //Caused by an error response from Cassandra
> session.execute(batch.setConsistencyLevel(ConsistencyLevel.ALL));
> {code}
> Wrong error information could affect driver retry policies.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message