...
Commit Protocol Changes
Commit
- Wen When a tx is started a new version is assighned and MVCC coordinator adds a local TxLog record with XID and ACTIVE flag
- the first change request to a datanode within the transaction produces a local TxLog record with XID and ACTIVE flag at the data node.
- at the commit stage each tx node adds a local TxLog record with XID and LOCALLY_COMMITTED flag and sends an acknowledge to TX coordinator
- TX coordinator sends to MVCC coordinator node a tx committed message.
- MVCC coordinator adds TxLog record with XID and COMMITTED flag, all the changes become visible.
- TX coordinator sends to participants a commit acknowledged message, nodes asyncronously mark tx as COMMITTED.
An error during commit
- Wen When a tx is started a new version is assighned and MVCC coordinator adds a local TxLog record with XID and ACTIVE flag
- the first change request to a datanode within the transaction produces a local TxLog record with XID and ACTIVE flag at the data node.
- at the commit stage each tx node adds a local TxLog record with XID and LOCALLY_COMMITTED flag and sends an acknowledge to TX coordinator
- In case at least one participant does not confirm commit, TX coordinator sends to each participant rollback message
- each tx node adds a local TxLog record with XID and ABORTED flag and sends an acknowledge to TX coordinator, all the locks became released.
- TX coordinator sends to MVCC coordinator node a tx rolled back message.
- MVCC coordinator adds TxLog record with XID and ABORTED flag.
Rollback
- Wen When a tx is started a new version is assighned and MVCC coordinator adds a local TxLog record with XID and ACTIVE flag
- the first change request to a datanode within the transaction produces a local TxLog record with XID and ACTIVE flag at the data node.
- at the rollback stage each tx node adds a local TxLog record with XID and ABORTED flag and sends an acknowledge to TX coordinator
- TX coordinator sends to MVCC coordinator node a tx rolled back message.
- MVCC coordinator adds TxLog record with XID and ABORTED flag.
...
{"serverDuration": 120, "requestCorrelationId": "f8f2a15edcfd50b6"}