Description
You can call this operation to associate an arbitration service with multiple OceanBase clusters.
Call description
Prerequisites
- You have the ARBITRATION:UPDATE permission on the target arbitration service.
- You have the CLUSTER:UPDATE permission on all clusters specified in the
clusterIdListparameter.
Request path
POST /api/v2/ob/clusters/batchAddArbitration
Request parameters
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| arbitrationServiceId | Long | Yes | 25 | The ID of the target arbitration service. |
| clusterIdList | List<Long> | Yes | 83,84 | The list of IDs of the OceanBase clusters to be associated with the arbitration service. Separate the cluster IDs with commas (,). |
| enabledArbitration | Boolean | Yes | true | Specifies whether to automatically enable the arbitration service for tenants with two or four full-featured replicas. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task return structure. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of 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. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
POST /api/v2/ob/clusters/batchAddArbitration
{
"arbitrationServiceId":25,
"clusterIdList":[83,84],
"enabledArbitration":true
}
Sample response
{
"data": {
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 29772,
"name": "Batch add arbitration service",
"operation": "EXECUTE",
"prohibitRollback": false,
"startTime": "2025-01-22T18:14:03.49+08:00",
"status": "RUNNING",
"subtasks": [
{
"description": "Wait node",
"downstreams": [
40599,
40605
],
"id": 40608,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 8,
"status": "PENDING",
"taskId": 29772,
"timeout": 30,
"upstreams": [
40598,
40602
]
},
{
"description": "Update OB cluster status",
"downstreams": [],
"id": 40601,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"taskId": 29772,
"timeout": 30,
"upstreams": [
40604
]
},
{
"description": "Operate ob arbitration service",
"downstreams": [
40606
],
"id": 40599,
"name": "Operate ob arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"taskId": 29772,
"timeout": 1800,
"upstreams": [
40608
]
},
{
"description": "Prepare to operate arbitration services",
"downstreams": [
40608
],
"id": 40602,
"name": "Prepare to operate arbitration services",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 10,
"status": "READY",
"taskId": 29772,
"timeout": 60,
"upstreams": []
},
{
"description": "Wait node",
"downstreams": [
40601,
40607
],
"id": 40604,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"taskId": 29772,
"timeout": 30,
"upstreams": [
40600,
40603
]
},
{
"description": "Prepare to operate arbitration services",
"downstreams": [
40608
],
"id": 40598,
"name": "Prepare to operate arbitration services",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 9,
"status": "READY",
"taskId": 29772,
"timeout": 60,
"upstreams": []
},
{
"description": "Update OB cluster status",
"downstreams": [],
"id": 40607,
"name": "Update OB cluster status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 6,
"status": "PENDING",
"taskId": 29772,
"timeout": 30,
"upstreams": [
40604
]
},
{
"description": "Enable tenant arbitration service",
"downstreams": [
40604
],
"id": 40603,
"name": "Enable tenant arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"taskId": 29772,
"timeout": 1800,
"upstreams": [
40606
]
},
{
"description": "Operate ob arbitration service",
"downstreams": [
40606
],
"id": 40605,
"name": "Operate ob arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"taskId": 29772,
"timeout": 1800,
"upstreams": [
40608
]
},
{
"description": "Enable tenant arbitration service",
"downstreams": [
40604
],
"id": 40600,
"name": "Enable tenant arbitration service",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"taskId": 29772,
"timeout": 1800,
"upstreams": [
40606
]
},
{
"description": "Wait node",
"downstreams": [
40600,
40603
],
"id": 40606,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"prohibitSkip": false,
"runTime": 1,
"seriesId": 7,
"status": "PENDING",
"taskId": 29772,
"timeout": 30,
"upstreams": [
40599,
40605
]
}
],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 40,
"server": "5e11a5f435",
"status": 200,
"successful": true,
"timestamp": "2025-01-22T18:14:03.507+08:00",
"traceId": "f10b6e133c2ada4f"
}