Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started



papishetty.praneeth_19978 avatar image
papishetty.praneeth_19978 asked papishetty.praneeth_19978 commented

Does LWT pick a master DC when we have multi DC deployment?

In a 2 DC deployment, When we use the consistency serial for Light Weight Transactions, does Cassandra pick a DC as a master DC to serialize the transactions?

cassandralightweight transactions
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered papishetty.praneeth_19978 commented

@papishetty.praneeth_19978 There is no concept of master/slave in Cassandra. Cassandra also doesn't "serialize" LWTs.

The SERIAL consistency is used in the read part of the read-before-write to satisfy the condition for the lightweight transaction. It lets C* read the current version of the data and if it encounters a write for the data which is still in progress, it commits the data as part of the read before returning a result.

At SERIAL consistency, it does not enlist nodes from a "master" DC. Instead it reads from a QUORUM of nodes (regardless of the DC they belong to) in order to satisfy the request. Cheers!

1 comment Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

That was my understanding too. I was confused when I saw high ClientRequestLatencies only in one region. If a write comes in to DC "A" with serial as a consistency instead of local_serial, it might hit the cross DC "B" and the same happens when a write comes to DC "B" . Ok let me pull some more metrics from the service side .

Thanks you very much for the reply .

0 Likes 0 ·