Skip to main content

πŸ”’ Snapshot Isolation in TuringDB

TuringDB is designed to support ACID transactions with native snapshot isolation (SI) as a default, zero-cost feature. This section explains:
  • What snapshot isolation is
  • Why it matters in graph databases
  • How TuringDB achieves it differently from Neo4J or MemGraph
  • And why it comes with no performance tradeoff in our architecture

πŸ’‘ What Is Snapshot Isolation?

Snapshot isolation (SI) is a database property that guarantees:
A transaction sees a consistent snapshot of the database as it was at the start of the transaction.

βœ… Key Guarantees

  • You only see committed data
  • You never see uncommitted or intermediate states
  • You never see the effects of future or concurrent transactions
  • Your transaction operates on a stable, unchanging view of the graph
πŸ“˜ Definition adapted from the classic ACID transaction model (Gray & Reuter, 1993; Haerder & Reuter, 1983)

πŸ” TuringDB is Fully ACID-Compliant

TuringDB supports the full ACID model:
PrincipleMeaning
AtomicityAll-or-nothing: if a transaction fails, nothing is applied
ConsistencyEvery transaction transforms the graph from one valid state to another
IsolationEach transaction operates as if it’s the only one
DurabilityOnce committed, data survives crashes and restarts
🧠 Based on the definition of Jim Gray & Andreas Reuter (Gray & Reuter, 1993)

πŸ†š Industry Comparisons: Neo4J and MemGraph

Most graph databases fall short of true snapshot isolation.

πŸ”Έ Neo4J

  • Default isolation level: Read Committed
  • This means you might observe changes from concurrent transactions
  • Neo4J allows non-repeatable reads unless you manually manage locks
  • Full SI is not enforced unless using explicit log-based transaction locking
πŸ“Ž Neo4J docs
🧨 Risk: Unpredictable graph states in analytics or during parallel workflows.

πŸ”Έ MemGraph

  • Claims to be ACID-compliant
  • Offers multiple isolation levels, but not full snapshot isolation by default
  • Isolation behavior depends on how queries and write batches are structured
πŸ“Ž MemGraph blog: ACID & Isolation
🧨 Risk: Reads and writes may conflict without explicit coordination.

βœ… TuringDB’s Approach to Snapshot Isolation

TuringDB provides Snapshot Isolation by default, and critically:
It comes at zero performance cost.
Here’s how:

πŸ” Versioned Graphs by Design

Every graph in TuringDB is stored as a sequence of immutable commits, much like Git. Each commit is composed of DataParts, read-optimized storage chunks for nodes and edges. πŸ”Ή Each transaction runs against a specific commit snapshot πŸ”Ή That snapshot is immutable and isolated πŸ”Ή Reads do not block writes, and vice versa πŸ”Ή You can always β€œtime travel” to past states by checking out any previous commit
TuringDB doesn’t need to acquire write locks or maintain transaction logs for reads. SI is built-in, not bolted on.
πŸ“˜ See also: DataParts and Versioning

⚑ Why It Matters

FeatureWithout SIWith Snapshot Isolation (TuringDB)
Concurrent analyticsRisk of inconsistencyβœ… Always safe and repeatable
LLM or AI agent readsCan see in-progress updatesβœ… Only sees committed graph states
Live dashboardsGlitches from concurrent writesβœ… Never interrupted or corrupted
Graph training workflowsRisk of nondeterminismβœ… Guaranteed reproducibility
Rollbacks or auditsHard to traceβœ… Time-travel enabled by commit history

πŸ“˜ Further Reading

πŸ§ͺ Summary

TuringDB offers built-in Snapshot Isolation that is: βœ… Default βœ… Immutable βœ… Fast βœ… Lock-free βœ… Compatible with analytics and AI use cases βœ… Based on a Git-like architecture built for parallelism and consistency
It’s the first graph database to natively combine versioning, immutability, and snapshot isolation, without the tradeoffs.
⌘I