Chapter 3: Running Multiplex Transactions


Multiplex transactions overview

A local transaction is any transaction that does not modify a shared object. Note that a local transaction may be read-only or read-write but modify data in local objects only (SA tables or temp tables). Local transactions may be performed on any multiplex node, and the effects of the transaction are only visible to that node.

A global transaction is any transaction that modifies data in shared objects or changes the schema of any persistent object. Global transactions may only be performed on the coordinator node or a writer node. The effects of a global transaction are visible on all nodes of the multiplex.

All transactions begin as local transactions. A transaction only becomes global when the first read-write operation (such as an insert) is initiated on a shared IQ object. When a global transaction is initiated from a secondary writer node, the coordinator node must be running, because the writer node must communicate with the coordinator node in order to coordinate the global aspects of the transaction.

In a writer-initiated global transaction, the writer node CPU and local disks are used to do the work of the read-write operation, while the coordinator node handles the global bookkeeping for the transaction, such as the assignment of global transaction IDs, global lock management, and writing the TLV log.

If the coordinator fails or is shut down during a writer-initiated global transaction, a “Coordinator node not responding” error occurs. Depending on the current state of the global transaction, one of the following will happen:

NoteIf a global transaction initiated from a writer node modifies both global and local persistent objects (for example, an SA base table and an IQ base table), and the coordinator fails during commit, global object changes may be committed while local object changes are lost. This is consistent with the same scenario updating both local and proxy tables in the same transaction, where “best effort” is used to commit both local and global components of a transaction.