How is the serial consistency level configured?

Serial consistency levels in DataStax Enterprise control lightweight transaction (LWT) isolation.

Serial consistency levels in DataStax Enterprise control lightweight transaction isolation. The consistency levels for lightweight transactions are shown in the following table.

Serial consistency levels

Table 1. Serial Consistency Levels
Level Description Usage
SERIAL Achieves linearizable consistency for lightweight transactions by preventing unconditional updates. This consistency level is for use only with lightweight transactions. Equivalent to QUORUM.
LOCAL_SERIAL Same as SERIAL but confined to a single data center. A conditional write must be written to the commit log and memtable on a quorum of replica nodes in the same datacenter. Same as SERIAL but used to maintain consistency locally (within the single local datacenter). Equivalent to LOCAL_QUORUM.

For local consistency, which enforces serialization within the local datacenter, use:

  • LOCAL_SERIAL for LWT reads.
  • LOCAL_QUORUM and LOCAL_SERIAL for LWT writes.

For global consistency, which enforces serialization across multiple datacenters, use:

  • SERIAL for LWT reads.
  • QUORUM and SERIAL for 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.