How is the serial consistency level configured?
Serial consistency levels control lightweight transaction isolation. The consistency levels for lightweight transactions are shown in the following table.
Serial consistency levels
| Level | Description | Usage |
|---|---|---|
|
Achieves linearizable consistency for lightweight transactions by preventing unconditional updates. |
This consistency level is for use only with lightweight transactions.
Equivalent to |
|
Same as |
Same as |
For local consistency, which enforces serialization within the local datacenter, use:
-
LOCAL_SERIALfor LWT reads. -
LOCAL_QUORUMandLOCAL_SERIALfor LWT writes.
For global consistency, which enforces serialization across multiple datacenters, use:
-
SERIALfor LWT reads. -
QUORUMandSERIALfor LWT writes.
Background information: The SERIAL consistency level defines the serial consistency level for the Paxos consensus of lightweight transactions.
The learn phase uses a normal consistency level to define which read operations will be guaranteed to complete immediately if lightweight writes are occurring.
The SERIAL consistency level is ignored for any query that is not a conditional update.