What will happen if write failed in cassandra cluster when using QUORUM CL? -
suppose have 3 nodes, rf 3, , using quorum cl. when write data record cluster, if 1 node succeed, 1 failed. whole write request failed, happen succeed node? roll automatically? or propagated other node via gossip. , 3 nodes have record original request failed?
there's article it. tl&dr version:
- query coordinator try persist write on nodes according rf=3. if 2 of them has failed, cl=quorum write considered failed.
- a single node accepted failed write not rollback it. persist on memtable/disk nothing suspicious happened.
- cassandra eventually consistent database, it's absolutely fine in inconsistent state period of time, converging consistent state in future.
- next time read (cl=quorum) key failed write, if there's still not enough nodes online, you'll failed read. if other 2 nodes come life, have read quorum (even if third node data differs key) , you'll receive previous value, unaffected failed write.
- if cassandra detects such conflict single key, performs read repair process, when conflicting minority nodes data overwritten data quorum's majority. node, accepted failed write, self-heal inconsistent row on next successful quorum read.
Comments
Post a Comment