All Products
Search
Document Center

Tablestore:AbortTransaction

Last Updated:May 24, 2024

Aborts a local transaction. If you do not want to save data modifications after you create a local transaction based on a specified partition key value and perform read and write operations within the local transaction, you can abort the local transaction or wait until the transaction times out.

Usage notes

  • The validity period of a local transaction can be up to 60 seconds.

    If a local transaction is not committed or aborted within 60 seconds, the Tablestore server determines that the local transaction times out and aborts the transaction.

  • If no write operation is performed on the data in a local transaction, the commit and abort operations have the same effect.

Request syntax

message AbortTransactionRequest {
    required string transaction_id = 1;
}

Parameter

Type

Required

Description

transaction_id

string

Yes

The ID of the local transaction.

Response syntax

message AbortTransactionResponse {
}

Use Tablestore SDKs

You can use the following Tablestore SDKs to implement local transactions: