cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeronimo de A. Barros" <>
Subject Lightweight Transactions during datacenter outage
Date Tue, 07 Jun 2016 17:26:43 GMT

I have a cluster spreaded among 2 datacenters (DC1 and DC2), two server on
each DC and I have a keyspace with NetworkTopologyStrategy (DC1:2 and
DC2:2) with the following table:

  k1 int,
  k2 timeuuid,
  PRIMARY KEY ((k1), k2)

During a datacenter outage, as soon as a datacenter goes offline, I get
this error during a lightweight transaction:

cqlsh:devtest> insert into test (k1,k2) values(1,now()) if not exists;
Request did not complete within rpc_timeout.

And a short time after the on-line DC verify the second DC is off-line:

cqlsh:devtest> insert into test (k1,k2) values(1,now()) if not exists;
Unable to complete request: one or more nodes were unavailable.

So, my question is: Is there any way to keep lightweight transactions
working during a datacenter outage using the C* Python driver 2.7.2 ?

I was thinking about catch the exception and do a simple insert (without
"IF") when the error occur, but having the lightweight transactions working
even during a DC outage/split would be nice.

Thanks in advance for any help/hints.

Best regards, Jero

View raw message