In particular I was looking at this page where it says:
If lightweight transactions are used to write to a row within a partition, only lightweight transactions for both read and write operations should be used.
I'm confused as to what using LWTs for read operations looks like. Specifically how this relates to per-query consistency (and serialConsistency) levels.
The description for SERIAL
read consistency raises further questions:
Allows reading the current (and possibly uncommitted) state of data without proposing a new addition or update.
That suggests that using SERIAL
for reads is not "using a LWT".
But then
- How does Cassandra know to check for in-progress transactions when you do a read?
- What is the new update that is proposed while you're trying to read, and how does this affect the read?
- How would that work if the consistency you're reading at (say
ONE
for example) is less than the serialConsistency used for writing? - Once you use a LWT on a table (or row?, or column?), are all non-
SERIAL
reads forced to take the penalty of participating in quorums and the transaction algorithm? - Does the requirement actually apply to the whole row, or just the columns involved in the conditional statement?
If I ignore this advice and make both serial and non-serial reads/writes. In what way to the LWTs fail?