1

We have DSE 4.8.7 cluster with 3 datacenters, 5 nodes each. Ww have a keyspace with RF 3, 3, 2.

We're using lightweight transactions.

When performing operations that involve shutting down a node on the datacenter with RF2, we have issues with the lightweight transactions as SERIAL consistency level cannot be met.

Is there a way to change the driver to use LOCAL_SERIAL instead of SERIAL?

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23

1 Answers1

4

There are two ways you can configure serial consistency level using the DataStax java driver:

At a per statement level:

statement.setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL);
session.execute(statement);

Globally for all queries:

Cluster.builder()
    .withQueryOptions(new QueryOptions()
        .setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL))
    .build();
Andy Tolbert
  • 11,418
  • 1
  • 30
  • 45