Help Center/ TaurusDB/ API Reference/ APIs/ Traffic Management/ Querying the Execution Progress of Large Transactions
Updated on 2026-08-31 GMT+08:00

Querying the Execution Progress of Large Transactions

Function

This API is used to query the execution progress of transactions based on transaction IDs. Currently, only the execution progress of rollback transactions can be queried. Before calling this API:

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    gaussdbformysql:instance:listProcesses

    List

    instance *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    gaussdb:instance:listProcesses

    -

URI

POST /v3/{project_id}/instances/{instance_id}/nodes/{node_id}/txn-progress

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

To obtain this value, see Querying DB Instances.

Constraints

N/A

Range

The value contains 36 characters with a suffix of in07. Only letters and digits are allowed.

Default Value

N/A

node_id

Yes

String

Definition

Node ID.

To obtain this value, see Querying Details of a DB Instance.

Constraints

The node role must be the primary node.

Range

The value contains 36 characters, starting with a UUID and ending with no07. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

Content-Type

Yes

String

Definition

Content type.

Constraints

N/A

Range

application/json

Default Value

application/json

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us: English

  • zh-cn: Chinese

Default Value

en-us

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Definition

Transaction action type to be queried.

Constraints

N/A

Range

rollback: transaction rollback progress query

Default Value

rollback

transaction_ids

No

Array of strings

Definition

List of unique transaction IDs.

  • If the list is empty or not passed, a full query will be performed, and information about all currently executing transactions will be returned based on the limit and offset pagination parameters.

  • If the list is not empty, exact matching will be performed and information about the transactions specified in transaction_ids will be returned. In this case, the pagination parameters (limit and offset) are invalid.

Constraints

A maximum of 100 transaction IDs can be queried at a time.

limit

No

Integer

Definition

Number of records returned by a query.

Constraints

The value must be an integer and cannot be a negative number.

Range

1–100

Default Value

100

offset

No

Integer

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

The value must be an integer and cannot be a negative number.

Range

≥ 0

Default Value

0

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

transactions

Array of TxnItem objects

Definition

Progress list of active transactions (being rolled back). If the transaction specified by the ID has ended or the entered ID does not exist, the transaction will not be returned in this list.

total_count

Integer

Definition

Total number of transaction records that meet the search criteria.

Range

0–100

Table 5 TxnItem

Parameter

Type

Description

trx_id

String

Definition

Unique ID of a transaction.

Range

N/A

estimated_remaining_time

Long

Definition

Estimated remaining time for completion, in seconds.

Range

> 0

trx_mysql_thread_id

Long

Definition

ID of a user session thread.

Range

N/A

trx_query

String

Definition

Additional information, which is usually the statement that is being executed.

Range

N/A

trx_started

String

Definition

Transaction start time.

Range

N/A

trx_rows_modified

Long

Definition

Number of rows modified by the transaction.

Range

≥ 0

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Querying information about all transactions being rolled back for instance a23fb62bd61e4e9e9636fd2225f395bein07

POST https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/a23fb62bd61e4e9e9636fd2225f395bein07/nodes/18663926eacb443d98dc20f8620f28f2no07/txn-progress

{
  "action" : "rollback",
  "limit" : 10,
  "offset" : 0
}

Example Response

Status code: 200

Success.

{
  "transactions" : [ {
    "trx_id" : "txn1",
    "estimated_remaining_time" : 120,
    "trx_mysql_thread_id" : 2075425,
    "trx_query" : "select sleep(1000)",
    "trx_started" : "2026-04-30T18:00:00Z",
    "trx_rows_modified" : 0
  }, {
    "trx_id" : "txn2",
    "estimated_remaining_time" : 0,
    "trx_mysql_thread_id" : 2075426,
    "trx_query" : "show processlist",
    "trx_started" : "2026-04-30T18:05:00Z",
    "trx_rows_modified" : 0
  } ],
  "total_count" : 2
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.