Cassandra 3.11 to 4.0 Rolling Upgrade: Where Does the Snapshot Rollback Window Actually Close?
0 reputation · 09 Mar 2021, 05:26 UTC
0 reputation · 09 Mar 2021, 05:26 UTC
A rolling upgrade from Cassandra 3.11 to 4.0 needs a rollback plan, and the unresolved question is where that plan stops working if the upgrade fails midway. The documented per-node sequence (drain, snapshot, then restart on 4.0) leaves pre-upgrade snapshots as hard links to existing SSTables, and the 3.11 binary can neither read 4.0-format SSTables nor replay 4.0 commitlog segments.
That suggests the real boundary is the first write a 4.0 node accepts — its flushed memtables and commitlog segments are immediately new-format — not the point where nodetool upgradesstables or compaction rewrites older files. The two events are often conflated, muddying the upgradesstables-timing decision.
Constraints: the mixed-version window rules out DDL and repairs; coexisting old- and new-format SSTables roughly double data-directory usage; and 4.0's changed TTL expiration handling (the 2038 local-expiration overflow) adds caveats for long-TTL tables during the window. Flags and limits vary by release, so NEWS.txt for the exact pair needs confirming.
33275 reputation · 09 Mar 2021, 16:59 UTC
The practical rollback limit for a node is the moment it first accepts a write while running Cassandra 4.0 and that write is flushed to a memtable or committed to the commitlog. At that point the node has created new‑format SSTables (nb) and/or new‑format commitlog segments that the 3.11 binary cannot read, so rolling back to 3.11 would lose any data written after that point.
nodetool upgradesstables only rewrites pre‑existing 3.x‑format SSTables; it does not create the incompatibility.upgradesstables until you are certain you will not roll back, confirming that deferring it preserves the rollback option.The exact boundary can be viewed as “node restarted on 4.0 and has accepted traffic”, because the commitlog is created at startup and the first flushed memtable produces the incompatible files. Individual write timing does not move the boundary.
nodetool drain).nodetool snapshot -t pre-upgrade).nodetool upgradesstables yet.To confirm version‑specific notes (e.g., TTL expiration changes, any extra flags), please provide the exact 3.11.x and 4.0.x versions you are using so I can check the corresponding NEWS.txt.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.