txn_commit
Apply a transaction's writes atomically, and check that every write actually joined it.
async fn txn_commit(&self, request: &TxnCommitRequest) -> Result<TxnCommitResponse>Parameters
txn_idUUID bytesrequiredThe transaction to commit.
Returns
txn_idUUID bytesalwaysEchoed back.
committed_at_unix_nanos64-bit integeralwaysWhen it landed.
operations_appliedintegeralwaysHow many operations were in it. Compare this against what you sent — a mismatch means a write did not carry the id and has already landed outside the transaction.
HTTP has no transactions
The HTTP edge exposes no transaction routes. Each HTTP verb is its own unit. If several writes must land together, you need the wire client — see Wire client.
Failure modes
TransactionConflict409fatalAnother transaction touched the same rows. Terminal for this transaction; retry the whole unit, not the commit.
TransactionTooLarge413fatalThe transaction exceeded the server's size bound. Split the work.
TransactionTimeout408fatalThe transaction's timeout elapsed before the commit arrived. Its writes did not land.
Was this page helpful?