Having the following configuration: 3 nodes, RF=2, when executing a LWT query with CL=one (no serial consistency manually set) if one of the nodes is down (basically have 2 out of 3 nodes up) I get this error: SERIAL is not supported as conditional update commit consistency. Use ANY if you mean \"make sure it is accepted but I don't care how many replicas commit it for non-SERIAL reads\
It's similar to what error you'd get when setting serial consistency values to the consistency field - but i do set consistency one, not serial.
Some code, for context:
$clusterBuilder = new Builder();
$clusterBuilder
->withDefaultConsistency(\Cassandra::CONSISTENCY_ONE)
->withDefaultPageSize(1000)
->withContactPoints('node1, node2, node3')//node3 is down
->withPort(6666)
->withTokenAwareRouting(true)
->withConnectTimeout(5)
->withRequestTimeout(5)
->withPersistentSessions(true)
->withRoundRobinLoadBalancingPolicy()
->withCredentials('test', 'test');
$cluster = $clusterBuilder->build();
$session = $cluster->connect('mykeyspace');
$statement = new \Cassandra\SimpleStatement(
"UPDATE mykeyspace.my_table SET field1 = true WHERE field2 = false IF EXISTS");
$future = $session->executeAsync($statement);
$result = $future->get();
//this code(under the given conditions - 1 node down) gives the error above.
Even if i manually set consistency and serial_consistency via execution options, the same error appears.
$options = new \Cassandra\ExecutionOptions(array(
'consistency' => \Cassandra::CONSISTENCY_ONE,
'serial_consistency' => \Cassandra::CONSISTENCY_SERIAL
));
$future = $session->executeAsync($statement, $options);
$result = $future->get();
If all nodes are up, everything works as expected.
The issue seems similar to the one described here: https://issues.apache.org/jira/browse/CASSANDRA-10785
Could it be a driver problem, or am I missing something?
Thanks,
Silviu
The issue seems similar to the one described here: https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_CASSANDRA-2D10785&d=DwIFaQ&c=adz96Xi0w1RHqtPMowiL2g&r=Rf6Q4KBOgazA7AqLjbPEhmTMX0gM5i3vnlC-YCIo38g&m=qy0nBC53KL-L0hM6WxtiWfrx0YOZc87TmWw7yIBHE4w&s=BGLiGs_g0CPSh2zPL2vwmuXy3XrEbKek6-uqt32gTII&e=
Could it be a driver problem, or am I missing something?
Thanks,
Silviu
--
You received this message because you are subscribed to the Google Groups "DataStax PHP Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-driver-user+unsubscribe@lists.datastax.com.
datastax/php-driver version is 1.2.2.
Yes, from cqlsh it all makes sense: if one sets CL=SERIAL and runs update query, it crashes. Thing is, I'm NOT setting CL to SERIAL, as highlighted in my snippet(I set CL to ONE), and I still get this error.
Thanks,
Silviu