v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1350180291.1 KB
projects

Commits a transaction. The request includes the mutations to be applied to rows in the database. Commit might return an ABORTED error. This can occur at any time; commonly, the cause is conflicts with concurrent transactions. However, it can also happen for a variety of other reasons. If Commit returns ABORTED, the caller should retry the transaction from the beginning, reusing the same session. On very rare occasions, Commit might return UNKNOWN. This can happen, for example, if the client job experiences a 1+ hour networking failure. At that point, Cloud Spanner has lost track of the transaction outcome and we recommend that you perform another read from the database to see the state of things as they are now.

post/v1/{+session}:commit

Path parameters

sessionstring required

Required. The session in which the transaction to be committed is running.

Request body

transactionIdstring byte

Commit a previously-started transaction.

returnCommitStatsboolean

If true, then statistics related to the transaction is included in the CommitResponse. Default value is false.

maxCommitDelaystring google-duration

Optional. The amount of latency this request is configured to incur in order to improve throughput. If this field isn't set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a commit delay value between 0 and 500 ms.

Response

Successful response