This is not duplicate on my previous post – now I would like to concentrate now on mixed row update.
Two clients send updates on two rows identified by the same key (RowA and RowB). Rows are persisted in the same Column Family. Both requests have the same timestamp.
- Client 1 sends insert:
RowA:{col:"valA1"}, RowB:{col:"valB1"} - Client 2 sends insert:
RowA:{col:"valA2"}, RowB:{col:"valB2"}
What is the result of such update ?
Is is possible that one on the clients winns, because we have update within the same column family?
Is mixed result possible – for example RowA:{col :"valA1"}, RowB:{col:"valB2"} ?
Is is possible to predict result of such update?
If two Writes to the same row/column have the same time stamp, then the tie is broken by comparing the byte values of the columns, see CASSANDRA-1039 for details.
In the example you give above, client2’s writes would win, as client 2 is writing values with byte[]’s that are greater than client 1’s.
As others have pointed out, this write,
Is the same as two writes,