Datastore transactions in Atoti are the mechanism for loading, updating, and removing data in a controlled and consistent way. They ensure that changes to the datastore are applied atomically and safely, maintaining data integrity across all tables and references. Transactions are essential because they:Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
- Guarantee atomicity, isolation, and consistency.
- Prevent partial updates that could leave the datastore in an inconsistent state.
- Coordinate updates across joined tables.
How do transactions work in Atoti?
Transactions allow multiple operations to be grouped into a single unit of work. This ensures:- Atomicity: All operations succeed or none do.
- Isolation: Intermediate states are never visible to other users or processes.
- Consistency: The datastore moves from one valid state to another.
- Initial state: All tables are unlocked.
- Start transaction: When a transaction begins, the relevant tables are locked.
- If specific tables are named, those tables and their referenced tables are locked.
- If no tables are named, all tables in the datastore are locked.
- Perform operations: Data is added, updated, or removed.
- Commit transaction: Changes are flushed, locks are released, and other transactions can start.
What happens when tables are locked?
During a transaction, tables involved in the operation are locked.This prevents other transactions from starting on those tables until the current transaction is committed.
Locking ensures that references between tables remain consistent during updates.
How do isolated tables behave?
- Isolated tables are not joined to the base table.
- Transactions on isolated tables do not affect other tables.
- Multiple transactions can run concurrently if they involve isolated tables.
Can transaction timings be monitored?
Atoti provides monitoring tools to track transaction performance:- Transaction timings: Measure how long transactions take from start to commit.
- Metrics: Help identify bottlenecks in data loading or updates.