Skip to main content

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.

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:
  • Guarantee atomicity, isolation, and consistency.
  • Prevent partial updates that could leave the datastore in an inconsistent state.
  • Coordinate updates across joined tables.
Without transactions, concurrent updates could lead to data corruption or broken references between tables. This in turn could lead to incorrect query results.

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.
Transactions follow a clear workflow:
  1. Initial state: All tables are unlocked.
  2. 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.
  3. Perform operations: Data is added, updated, or removed.
  4. 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.
Monitoring is essential for optimizing throughput and ensuring smooth real-time updates. Find out more about transactions by following these links: