首批通过分布式安全可靠测评,为关键业务系统打造
如何对租户缩容时删除指定的 unit
更新时间:2026-06-10 01:56
通过减少租户的 unit 数量来实现租户缩容时,可以指定删除某个 OBServer 节点上的 unit,比如一台处于离线状态的故障服务器上的 unit。
适用版本
OceanBase 数据库 V2.x、V3.x 版本。
操作步骤
查询要删除的 unit 的 unit_id。
obclient> select zone,svr_ip,resource_pool_name,unit_id from oceanbase.gv$unit where tenant_name='mysql';修改 resource pool 中的 unit number 并指定要删除的 unit_id。
obclient> alter resource pool pool_mysql_zone1 unit_num=2 delete unit=(1004);查看 unit 删除的进度。
obclient> select zone,svr_ip,unit_id,status from oceanbase.__all_unit where unit_id in (1004);