HeadlinesBriefing favicon HeadlinesBriefing.com

Cassandra 6 ACID Transactions Evolution

Hacker News •
×

Apache Cassandra has evolved from an eventually consistent NoSQL database to a fully ACID-compliant system in its upcoming 6.0 release. The journey includes atomic batches introduced in 2013, single-partition Paxos compare-and-swap operations later that year, and now strictly serializable cross-partition transactions with Accord in unreleased Cassandra 6.

This article explores each transactional option using a three-node cluster with an accounting workload. The setup involves installing Java 21, building Cassandra from the cassandra-6.0 branch, and configuring three nodes with unique IP addresses and JMX ports.

The accounting test uses two accounts with starting balances of 1,000 each, with concurrent writers producing transfers between accounts. The workload tests four transactional methods: none (default), BATCH updates, Lightweight Transactions (LWT), and Accord (ACID) updates. Read-modify-write and blind write variants are tested, along with cross-partition and same-partition transfer scenarios.

A third thread continuously reads and validates that the sum of balances remains 2,000 throughout the concurrent operations. The test also verifies final account balances match expected deterministic values for read-modify-write workloads.