Transaction Processing and ACID Support

Updated Sept 1, 2023

This document describes the transactional support provided by the TigerGraph platform.

A TigerGraph transaction is a sequence of operations which acts as a single logical unit of work.

A read-only operation in TigerGraph does not add or remove vertices or edges or change any vertex/edge attribute values. An update operation in TigerGraph is an operation which either changes some vertex/edge attribute value or inserts some new or delete some existing vertex/edge.

The TigerGraph system provides full ACID transactions with Strong Consistency. Transactions are defined as follows:

  • Each GSQL query is a transaction. Each query may have multiple read or write operations.

  • Each REST++ GET, POST, or DELETE operation (which may have multiple update operations within it) is a transaction.

Atomicity

A transaction with update operations may insert/delete multiple vertices/edges or update the attribute values of multiple vertices/edges. Such update requests are "all or nothing": either all changes are successful, or none are.

Consistency

The TigerGraph system provides distributed system Strong Consistency: An update transaction is considered complete when every replica of the data finishes its update. All replicas perform updates in the same order.

Isolation Level

TigerGraph supports the read-committed isolation level, the default standard for many major databases. Internally, TigerGraph uses MVCC to implement the isolation.

Durability

Committed transactions are written to disk (SSD or HDD). The TigerGraph platform implements write-ahead logging (WAL) to provide durability.

Memory data threshold

When a transaction is too large on a single gpe node, TigerGraph will convert the transaction binary from memory to file before the transaction is committed or rolled back.

There is a threshold for such conversion.

The threshold can be configured via gadmin config:
GPE.BasicConfig.Env
with an entry value like:
TransactionStoreMemLimit=4194304

The value must be uint64_t type and in unit: Byte. The default value is 4194304, which means 4 MB.

Total data threshold

If a transaction is too large, it will be aborted, even the transaction is already in file mode.

The transaction size threshold to abort it can be configured via gadmin config:
 GPE.BasicConfig.Env
with an entry value like:
TransactionSizeLimit=1073741824

The value 1073741824 stands for 1GB threshold. The value must be uint64_t type and in uint: Byte.

The default value is 0. When the value is 0, the threshold is dynamically decided by TigerGraph, based on current memory usage statistics.