Important
The SingleStore 9.0 release candidate (RC) gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
Two-Phase Transaction Commit
On this page
SingleStore supports atomic, distributed transactions.
The 2PC Protocol
The 2PC protocol ensures that all changes in a transaction are either committed or rolled back.
In 2PC, a node is designated as the coordinator and is responsible for coordinating transaction commit with the other nodes.ack
) back to the coordinator to indicate their local commit is complete.
Once the coordinator has received and recorded all the YES votes, the transaction is considered committed.
2PC Example
Consider a songs
table and the following query.songs
table which are distributed across many nodes.
CREATE TABLE songs(Id INT,Name TEXT,Genre TEXT,Rating DOUBLE,PublishTimestamp DATETIME);
UPDATE songsSET Genre = 'Pop Music' WHERE Genre = 'Pop';
This query updates all the rows in the songs
table that have Genre = 'Pop Music'
to Genre = 'Pop'
.Genre = 'Pop Music'
, which need to be updated, are distributed across multiple nodes, so this update involves multiple nodes.Genre='Pop Music'
are updated or none of them are updated.
The figure below illustrates 2PC on the songs
table distributed across two nodes.ack
to the coordinator.

In SingleStore, the coordinator role is performed by the aggregator and Node 1, Node 2 are leaf nodes.
All queries such as the above are run in transactions.
The above query uses an UPDATE
statement, the discussion and behavior apply to all data updates including INSERT
and DELETE
DML commands.
Troubleshooting 2PC
If an attempt to kill a query (transaction) occurs while 2PC is in process, the query may end up in an unknown state and the system will send the following error message.
OperationalError: 1997: Attempted to interrupt transaction execution, but the outcome is unknown because the transaction was already in its commit phase.
This error message means that a transaction (or a DML command) was in 2PC at the time the request to kill the transaction was received and so the system cannot determine if the request was received in time to kill the transaction or not.
2PC Impacts
The 2PC feature is enabled by default on all SingleStore 8.
Last modified: June 9, 2025