Purpose
This statement is used to maintain the status of OBServer nodes in the system and control operations such as adding, deleting, starting, and stopping OBServer nodes.
This statement can only be executed in the sys tenant.
Syntax
alter_system_server_stmt:
ALTER SYSTEM server_action SERVER ip_port_list [zone];
server_action:
ADD
| DELETE
| CANCEL DELETE
| START
| STOP
| FORCE STOP
| ISOLATE
ip_port_list:
ip_port [, ip_port ...]
Parameters
Parameters |
Description |
|---|---|
| ip_port | Specify the IP address and port of the OBServer. |
| zone | If a zone is specified, zone validation will be performed on the server to be maintained. |
| ADD | Adds an OBServer. ADD adds the OBServer to the service list. Only OBServer nodes in the service list can provide services. |
| DELETE | Deletes an OBServer. The DELETE operation removes the OBServer from the service list only after it is cleared, which triggers a unit migration. |
| CANCEL DELETE | Cancel the deletion of the OBServer. |
| START | Start the OBServer. |
| STOP | Stop the OBServer. STOP It checks whether the number of replicas remains a majority after stopping, waits for the synchronization of clog logs to complete, and waits for the leader replica to switch to another node (i.e., for a new leader election). |
| FORCE STOP | Forces the stop of an OBServer node. FORCE STOP Checks whether the number of replicas remains a majority after forced stop and waits for the leader replica to switch to another node (i.e., a new leader is elected).
NoticeForcibly stopping an OBServer node is not a routine maintenance operation. This operation is unsafe because it does not wait for clog log synchronization to complete. Therefore, it is generally not recommended. |
| ISOLATE | The failed OBServer node is isolated, and no new read or write requests are routed to its process. ISOLATE It does not wait for the leader replica to switch to another node (i.e., for a new leader to be elected). |
Examples
Add an OBServer node xxx.xx.xxx.xx1 to the cluster.
obclient> ALTER SYSTEM ADD SERVER 'xxx.xx.xxx.xx1:xxxx' ZONE 'zone1';