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

 

question

chandrasekar.b03_190734 avatar image
chandrasekar.b03_190734 asked ·

Is Two Phase Commit used in Apache Cassandra?

Is Two Phase commit used in C* ?

If so.......what is the purpose of using it and what is the importance of 2 phase commit in C* Data Modeling?

cassandra
10 |1000 characters needed characters left characters exceeded

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 ·

[EDITED] If you read Chapter 1 of Jeff Carpenter's book you quoted in your comment, you will realise that two-phase commits do not scale and blocks writes so they are a bad idea for databases like Cassandra.

Systems which use two-phase commits do not perform well in high-velocity workloads so it is not relevant in Cassandra. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

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

Hi Erick,

I looked about Two phase commit at this post

https://www.sciencedirect.com/topics/computer-science/two-phase-commit

I have given it a complete read where I also remembered this Two phase Commit term given in "Jeff's Cassandra Guide" book also.

Now I just want to know if it is used in C* and how to play with it ? Is there any performance improvement in using Two Phase Commit in C* or will it degrade its performance ?

(Two Phase Commit image included in this comment)

If it is not used in C*, then what is the reason for it ?

Kindly apologise me for taking your time cuz I still need to clear this doubt. Acknowledge in your available time. :)

0 Likes 0 · ·

Hi Erick,

Had a great relief from two phase Commit. Now I undertood the concept Jeff is trying to explain in that book.

0 Likes 0 · ·