From 965dd70b2348e166f250d6d5bcef8111aa9cf65e Mon Sep 17 00:00:00 2001 From: mck Date: Thu, 16 Apr 2026 21:03:48 +0200 Subject: [PATCH] Paxos v2 cassandra.yaml option patch by Mick Semb Wever; reviewed by Jon Haddad for CASSANDRA-21316 --- CHANGES.txt | 1 + conf/cassandra.yaml | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 1b7d7117d0..2a6c4ae97b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 4.1.12 + * Add Paxos v2 option and informatin in cassandra.yaml (CASSANDRA-21316) * Harden data resurrection startup check with atomic heartbeat file write with fallback (CASSANDRA-21290) Merged from 4.0: * Backport CASSANDRA-17810 fix and improve RTBoundValidator error messages (CASSANDRA-18282) diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml index 043ee9557b..42630eeae2 100644 --- a/conf/cassandra.yaml +++ b/conf/cassandra.yaml @@ -1348,6 +1348,35 @@ dynamic_snitch_reset_interval: 600000ms # until the pinned host was 20% worse than the fastest. dynamic_snitch_badness_threshold: 1.0 +# Paxos variant for lightweight transactions (LWTs) +# Options: +# v1 +# - Legacy Paxos. Expect 4RTs for a write and 3RTs for a read. (default) +# +# v1_without_linearizable_reads_or_rejected_writes +# - Legacy Paxos. Expect 4RTs for a write and 2RTs for a read. +# With legacy semantics for read/read and rejected write linearizability, i.e. not guaranteed. +# +# v2 +# - Optimized Paxos. Expect 2RTs for a write, and either 1RT or 2RT for a read. (recommended) +# +# v2_without_linearizable_reads +# - Optimized Paxos. Expect 2RTs for a write and 1RT for a read. +# +# v2_without_linearizable_reads_or_rejected_writes +# - Optimized Paxos. Expect 2RTs for a write and 1RT for a read. +# With legacy semantics for read/read and rejected write linearizability, i.e. not guaranteed. +# +# To upgrade from v1: +# 1. Ensure all nodes are on Cassandra 4.1+. +# 2. Run `nodetool repair --full -pr` on each node. +# 3. Set paxos_variant: v2 on each node and rolling restart. +# Rollback is safe: revert to v1 and rolling restart. No data migration needed. +# +# With any v2 variant and `paxos_state_purging: repaired` it is safe to use ANY Commit consistency. +# +#paxos_variant: v1 + # Configure server-to-server internode encryption # # JVM and netty defaults for supported SSL socket protocols and cipher suites can