分片变更预校验V3
功能介绍
分片变更预校验
URI
POST /v3/{project_id}/instances/{instance_id}/databases/{db_name}/migration/precheck
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 租户在某一region下的project ID。 |
| instance_id | 是 | String | DDM实例ID |
| db_name | 是 | String | 逻辑库名称 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| data_nodes | 是 | Array of DataNode objects | 变更后的数据节点信息。 变更后的分片数或数据节点数要比变更前多。 |
| new_shard_number | 是 | String | 变更后的分片数量。 变更后的分片数或数据节点数要比变更前多。单实例最大分片数:64。 |
响应参数
状态码:202
| 参数 | 参数类型 | 描述 |
|---|---|---|
| pre_check_results | Array of PreCheckResult objects | 关联的后端DN信息。 |
| job_id | String | 工作流ID。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| name | String | 检查项名称。 |
| status | String | 检查项结果。 |
| note | String | 检查项提示信息。 |
| handling_suggestion | String | 处理建议。 |
| error_message | String | 错误信息。 |
| error_detail_message | String | 详细错误信息。 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码。 |
| error_msg | String | 错误消息。 |
状态码:500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码。 |
| error_msg | String | 错误消息。 |
请求示例
{
"new_shard_number" : 9,
"data_nodes" : [ {
"id" : "7edae0250ebc464897bd92b8d3e8b769in01",
"user" : "root",
"password" : "xxxxxx"
} ]
} 响应示例
状态码:202
{
"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"
} 状态码
| 状态码 | 描述 |
|---|---|
| 202 | ok |
| 400 | bad request |
| 500 | server error |
错误码
请参见错误码。