If one node if down, driver wait until all cluster is up

20 views
Skip to first unread message

Con Con

unread,
Jan 23, 2017, 7:53:25 AM1/23/17
to DataStax Python Driver for Apache Cassandra User Mailing List
Hi,

I'm using cassandra-driver==3.7.1

Relevant Cassandra code:

create keyspace bile with replication = { ‘class’ : ‘SimpleStrategy’, ‘replication_factor’ : 2 };

CLUSTER = Cluster(['cassandra01.xxx.xxx', 'cassandra02.xxx.xxx',
'cassandra03.xxx.xxx', 'cassandra04.xxx.xxx'], port=9042)
SESSION = CLUSTER.connect('bile')
SESSION.execute('USE bile')

SESSION.execute(
"""
INSERT INTO abc (id, datetimestamp, xyz)
VALUES (%s, %s, %s)
""", (int(cas_id), cas_dt, mdata))

If I stooped one node the driver is going to wait until all cluster is up again but by default using CL=ONE.
How can I workaround this?

Thanks in advance.

Nguyen Luan

unread,
Jan 23, 2017, 9:12:08 AM1/23/17
to python-dr...@lists.datastax.com
I change CL to ANY or ALL. It worked.
Hope this help.


----------------------------------------------
Luan Nguyen
PostgreSQL DBA
Ho Chi Minh City - Viet Nam

--
You received this message because you are subscribed to the Google Groups "DataStax Python Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-driver-user+unsub...@lists.datastax.com.

Reply all
Reply to author
Forward
0 new messages