更新时间:2026-05-15 GMT+08:00
分享

查询分片变更预校验异步结果V3

功能介绍

查询分片变更预校验异步结果

URI

GET /v3/{project_id}/instances/{instance_id}/databases/{db_name}/migration/precheck/{job_id}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

租户在某一region下的project ID。

instance_id

String

DDM实例ID。

db_name

String

逻辑库名称。

job_id

String

工作流ID。参数获取,参见分片变更预校验

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

pre_check_results

Array of PreCheckResult objects

预校验结果列表。

job_id

String

预校验任务ID。

表4 PreCheckResult

参数

参数类型

描述

name

String

检查项。

status

String

检查结果。

成功:SUCCESS

失败:FAILED

警告:WARN

note

String

提示信息。

handling_suggestion

String

修改建议。

error_message

String

错误信息。

error_detail_message

String

详细错误信息。

状态码:400

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误消息。

状态码:500

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误消息。

请求示例

响应示例

状态码:200

{
  "job_id": "65c77858-e6a2-4694-8810-ab0b501b0003",
  "pre_check_results": [
    {
      "name": "Expire time of binlog in associated DN instances",
      "status": "SUCCESS",
      "note": "",
      "handling_suggestion": "Configuring shards require expiration of binlog more than 7 days(604800 seconds), please change binlog_expire_logs_seconds",
      "error_message": "",
      "error_detail_message": ""
    },
    {
      "name": "Tables with overwhelming table partitions",
      "status": "SUCCESS",
      "note": "",
      "handling_suggestion": "Every single row from source table will be recalculated and routed to all new partition table when shard number is changed. Because your partition table number will be overwhelming after configuring shard, shard configuring will take too long to finish. Please contact customer service.",
      "error_message": "",
      "error_detail_message": ""
    }
  ]
}

状态码:400

bad request

{
  "error_msg" : "Parameter error.",
  "error_code" : "DBS.280001"
}

状态码:500

server error

{
  "error_msg" : "Parameter error.",
  "error_code" : "DBS.280001"
}

状态码

状态码

描述

200

ok

400

bad request

500

server error

错误码

请参见错误码

相关文档