Tutorial: Building with CleaveDB
ACID Transactions — Overview
In distributed systems and mission-critical applications, multi-step operations (such as balance transfers, inventory checkout, or coordinated account setups) require strict transactional consistency. CleaveDB supports full ACID Transactions powered by an in-memory Software Transactional Memory (STM) buffer and Write-Ahead Logging (WAL).
Core pillars of CleaveDB transactions
Atomicity
All buffered statements in a BEGIN ... COMMIT block succeed together or none apply. A failure in any statement rolls back all earlier writes in that transaction.
Consistency
Write-time GUARD validation rules and DLS access policies are checked prior to commit. Any constraint violation prevents the transaction from committing.
Isolation
Transactions run in an isolated in-memory buffer via Software Transactional Memory (STM), preventing uncommitted dirty reads from being visible to parallel client connections.
Durability
Once COMMIT succeeds, the batched operations are flushed to disk in the append-only Write-Ahead Log (WAL) with group commit, guaranteeing durability across restarts.
Explore the Transaction topics
Review the guides below to master atomic transaction blocks in CleaveQL:
