~/docs/guides/transactions
DOCUMENTATION
Transactions
ACID transactions and isolation levels
KiteDB supports transactions for atomic operations. The low-level API provides explicit transaction control.
High-Level Transactions (Kite)
The high-level Kite API supports explicit transactions for batching multiple operations into a single commit. When the callback completes, the transaction commits; on error it rolls back.
typescript
Batch Operations
Batch operations run in a single transaction. This is ideal for fast ingestion (e.g., indexing a codebase) and guarantees atomicity.
typescript
Bulk Load (Max Throughput)
Bulk-load disables MVCC to minimize per-write overhead. Use for one-shot ingest or ETL jobs; avoid concurrent readers/writers while it runs.
typescript
Choose Your Write Path
| Goal | Recommended API |
|---|---|
| Max throughput, single writer | beginBulk() + batch APIs |
| Atomic ingest w/ MVCC | batch() / transaction() |
| Multi-writer throughput | syncMode: 'Normal' + group commit + chunked batches |
Current Limitations
- Traversal and path queries read the committed view. If you need to traverse newly written edges, commit first.
- JavaScript
batch()is synchronous; avoid async work inside a batch (do async work first, then batch the writes).
Basic Transactions
typescript
Read-Only Transactions
typescript
Transaction Status
typescript
Next Steps
- API Reference – Full transaction API
- Architecture – How transactions work