mirror of https://github.com/citusdata/citus.git
This commit adds distributed transaction id infrastructure in the scope of distributed deadlock detection. In general, the distributed transaction id consists of a tuple in the form of: `(databaseId, initiatorNodeIdentifier, transactionId, timestamp)`. Briefly, we add a shared memory block on each node, which holds some information per backend (i.e., an array `BackendData backends[MaxBackends]`). Later, on each coordinated transaction, Citus sends `SELECT assign_distributed_transaction_id()` right after `BEGIN`. For that backend on the worker, the distributed transaction id is set to the values assigned via the function call. The aim of the above is to correlate the transactions on the coordinator to the transactions on the worker nodes. |
||
---|---|---|
.. | ||
backend | ||
include | ||
test/regress |