Search code examples
cassandradistributed-system

Is Cassandra use two phase commit when config write multi replicas ?


From How is the consistency level configured? , the write must to written to multi nodes when configed ; So will cassandra rollback the successful node when the successful nodes don't meet the config .


Solution

  • Consistency level defines how many replicas need to answer to consider result (write or read) as successful. In case of write, if not enough replicas answered, the rollback won't happen - data could be written to some nodes, and then writes could be propagated via repairs, hints, etc.

    I recommend to read corresponding part of the DSE Architecture Guide - it has very good explanation how it works.