Updated on 2025-12-15 GMT+08:00

Querying the Comparison Task Progress

Function

This API is used to query the comparison progress of a running comparison task.

Note:

  • Currently, the comparison progress can be queried only for synchronization tasks and independent verification tasks from MySQL to MySQL, from MySQL to GaussDB Primary/Standby, from GaussDB Distributed to GaussDB Distributed, from GaussDB Primary/Standby to MySQL, from GaussDBv1 to GaussDB Primary/Standby, and from GaussDB Primary/Standby to GaussDBv1.
  • This function is available for running row comparison and value comparison.

Constraints

This API can be used only in certain regions. For details, see Endpoints.

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 role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permissions are required for calling this API.

URI

GET /v5/{project_id}/jobs/{job_id}/compare-progress/{compare_job_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

job_id

Yes

String

Task ID.

compare_job_id

Yes

String

ID of a comparison task.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

MIME type of the request body. The default value application/json is recommended. For APIs used to upload objects or images, the value varies depending on the flow type.

X-Auth-Token

Yes

String

User token obtained from IAM.

It is a response to the API for obtaining a user token. This API is the only one that does not require authentication.

After a response is returned, the value of X-Subject-Token in the response header is the token value.

X-Language

No

String

Request language type

en-us: English

zh-cn: Chinese

Enumerated values:

  • en-us
  • zh-cn

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

full_info

object

Full comparison information. This field is returned for row comparison and value comparison. For details, see Table 4.

incre_info

object

Incremental comparison information. This field is returned for dynamic value comparison. For details, see Table 5.

global_info

object

Global comparison information. For details, see Table 6.

Table 4 full_info

Parameter

Type

Description

progress

Float

Progress of full data comparison, in percentage (%).

src_speed

String

Speed of full data comparison.

recheck_entities

Integer

Number of inconsistent rows to be reviewed.

Table 5 incre_info

Parameter

Type

Description

delay

Float

Incremental comparison delay. If the delay is 0, all incremental data has been compared.

src_speed

String

Speed of incremental data comparison.

rps

Integer

Number of rows compared per second.

log_point

String

Incremental comparison position.

recheck_entities

Integer

Number of inconsistent rows to be reviewed.

Table 6 global_info

Parameter

Type

Description

src_speed

String

Global comparison speed.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Querying the comparison progress of a running comparison task

https://{endpoint}/v5/5237e10fe9aa4ad5b16b6a5245248314/jobs/9cbfd380-bdb1-43b2-9db9-3de2987jb201/compare-progress/b13b233a-4b9e-4b06-a928-19a0c93f6109

Example Response

Status code: 200

OK

{ 
  "full_info" : { 
    "progress" : 100, 
    "src_speed" : "0.00B/s", 
    "recheck_entities" : 0 
  }, 
  "incre_info" : { 
    "delay" : 9.58, 
    "src_speed" : "0.00B/s", 
    "rps" : 0, 
    "log_point" : "951de1d2-61ee-11f0-8081-fa163ef20ddd:51", 
    "recheck_entities" : 0 
  }, 
  "global_info" : { 
    "src_speed" : "0.00B/s" 
  } 
}

Status code: 400

Bad Request

{ 
  "error_code" : "DRS.10000010", 
  "error_msg" : "Task information not found." 
}

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

For details, see Error Code.