Skip to content

Transactions

Transactions

Full ACID-compliant transaction support with distributed capabilities.

Overview

HeliosDB provides comprehensive transaction support including:

  • Full ACID compliance
  • Multiple isolation levels
  • Distributed transactions with 2PC
  • Savepoints and nested transactions
  • XA transaction support

Quick Start

-- Basic transaction
BEGIN;
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
COMMIT;
-- With savepoints
BEGIN;
INSERT INTO orders (customer_id, total) VALUES (1, 500);
SAVEPOINT before_items;
INSERT INTO order_items (order_id, product_id) VALUES (1, 100);
-- Rollback to savepoint if needed
ROLLBACK TO SAVEPOINT before_items;
COMMIT;
-- Serializable isolation
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-- Conflicts automatically detected
COMMIT;

Isolation Levels

LevelDescriptionPerformance
READ UNCOMMITTEDDirty reads allowedFastest
READ COMMITTEDDefault, no dirty readsFast
REPEATABLE READSnapshot isolationGood
SERIALIZABLEFull serializabilitySafe

Features

FeatureDescription
SavepointsPartial rollback within transaction
Distributed 2PCTwo-phase commit across nodes
XA TransactionsExternal transaction coordinator support
Deadlock DetectionAutomatic deadlock resolution
Lock-Free MVCCHigh concurrency without blocking
  • MVCC: /docs/features/mvcc/
  • Deadlock Prevention: /docs/guides/user/DEADLOCK_PREVENTION_OPERATIONS_GUIDE.md

Status: Production Ready Version: v7.0