Description
You can call this operation to check the current state of the primary and standby OceanBase clusters and determine whether a failover operation can be performed.
Call description
Prerequisites
None.
Request path
POST /api/v2/ob/clusters/{id:[\\d]+}/failoverPreCheck
Request parameters
None.
Response
| Parameter | Type | Description |
|---|---|---|
| data | Object | The result of the failover pre-check. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request (in milliseconds). |
| status | Integer | The HTTP status code. |
| traceId | String | The Trace ID of the request, used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Failover pre-check result
| Parameter | Type | Description |
|---|---|---|
| clusterId | Long | The ID of the OceanBase cluster. |
| clusterName | String | The name of the OceanBase cluster. |
| result | Object | The details of the pre-check result. |
Pre-check result details
| Parameter | Type | Description |
|---|---|---|
| valid | Boolean | Indicates whether the pre-check passed. |
| messages | List |
The list of error messages. |
Example
Sample response
{
{
"data": {
"result": {
"messages": [],
"valid": true
}
},
"duration": 147,
"server": "xxx.xxx.xxx.xxx",
"status": 200,
"successful": true,
"timestamp": "2022-09-05T13:39:18.207+08:00",
"traceId": "b2979c141cb04651"
}