Queries the details and progress of an OnlineDDL task.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | GetOnlineDDLProgress | The operation that you want to perform. Set the value to GetOnlineDDLProgress. |
| Tid | Long | No | 3*** | The ID of the tenant.
Note To view the ID of the tenant, go to the Data Management (DMS) console and move the pointer over the profile picture in the upper-right corner. For more information, see
View information about the current tenant.
|
| JobDetailId | Long | Yes | 15*** | The ID of the OnlineDDL SQL task details. You can call the ListDBTaskSQLJobDetail operation to obtain the task detail ID. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 34E01EDD-6A16-4CF0-9541-C644D1BE01AA | The ID of the request. |
| Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
| ErrorMessage | String | UnknownError | The error message returned if the request failed. |
| ErrorCode | String | 403 | The error code returned if the request failed. |
| OnlineDDLTaskDetail | Object | The details of the task. |
|
| JobStatus | String | SUCCESS | The status of the task. Valid values:
|
| StatusDesc | String | Success | The description of the task status. |
| DelaySeconds | Long | 0 | The replay latency of DMS, in seconds. The replay latency is the period of time that is taken to replay the binary logs of the table to the temporary table. The latency does not indicate the replication latency between a primary database and a secondary database. |
| CopyTotal | Long | 10 | The estimated total number of rows of the data. The value is obtained from the statistical data in the information_schema database. In most cases, the estimated total number of rows is smaller than the actual number of rows in a table. |
| CopyCount | Long | 9 | The actual amount of data replicated from the original table in the lock-free change operation. |
| ProgressRatio | String | 90% | The estimated execution progress. The actual progress is subject to the task status. |
| CutoverLockTimeSeconds | Long | 2 | The maximum period of time that a table can be locked during cut-over, in seconds. |
| CutoverFailRetryTimes | Long | 3 | The number of retries when the cut-over fails. |
| CleanStrategy | String | DROP | The cleanup policy of the original table after the cut-over. Valid values:
|
| CopyChunkSize | Long | 1000 | The size of each chunk that is used to replicate data. A larger chunk size increases the replication efficiency and decreases the business performance.
Note During full replication, the original table is divided into N small chunks and each chunk is replicated to the temporary table one by one. By default, DMS dynamically adjusts the size of each chunk.
|
| CopyChunkMode | String | AUTO | The policy of full replication. Valid values:
|
| CutoverWindowStartTime | String | 12:00:00 | The beginning of the time window of the cut-over operation. Default value: 00:00:00. This parameter controls the time window of the cut-over. Cut-over can be performed only when the cut-over conditions are met and the time is within the specified time window. If the time is not within the time window, the cut-over operation is not performed until the time reaches the beginning of the time window. |
| CutoverWindowEndTime | String | 13:00:00 | The end of the time window of the cut-over operation. This value is at least 30 minutes later than the CutoverWindowStartTime parameter. Default value: 23:59:59 |
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=GetOnlineDDLProgress
&Tid=3***
&JobDetailId=15***
&Common request parameters
Sample responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetOnlineDDLProgressResponse>
<RequestId>34E01EDD-6A16-4CF0-9541-C644D1BE01AA</RequestId>
<Success>true</Success>
<OnlineDDLTaskDetail>
<JobStatus>SUCCESS</JobStatus>
<StatusDesc>Success</StatusDesc>
<DelaySeconds>0</DelaySeconds>
<CopyTotal>10</CopyTotal>
<CopyCount>9</CopyCount>
<ProgressRatio>90</ProgressRatio>
<CutoverLockTimeSeconds>2</CutoverLockTimeSeconds>
<CutoverFailRetryTimes>3</CutoverFailRetryTimes>
<CleanStrategy>DROP</CleanStrategy>
<CopyChunkSize>1000</CopyChunkSize>
<CopyChunkMode>AUTO</CopyChunkMode>
<CutoverWindowStartTime>12:00:00</CutoverWindowStartTime>
<CutoverWindowEndTime>13:00:00</CutoverWindowEndTime>
</OnlineDDLTaskDetail>
</GetOnlineDDLProgressResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "34E01EDD-6A16-4CF0-9541-C644D1BE01AA",
"Success" : true,
"OnlineDDLTaskDetail" : {
"JobStatus" : "SUCCESS",
"StatusDesc" : "Success",
"DelaySeconds" : 0,
"CopyTotal" : 10,
"CopyCount" : 9,
"ProgressRatio" : "90",
"CutoverLockTimeSeconds" : 2,
"CutoverFailRetryTimes" : 3,
"CleanStrategy" : "DROP",
"CopyChunkSize" : 1000,
"CopyChunkMode" : "AUTO",
"CutoverWindowStartTime" : "12:00:00",
"CutoverWindowEndTime" : "13:00:00"
}
}
Error codes
For a list of error codes, see Service error codes.