How to Cancel Nodes After Scaling In a TiDB Cluster

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 如何取消 tidb集群scale in后的节点

| username: Hacker_nTkchcIf

[TiDB Usage Environment] /Test/ Poc
[TiDB Version] 5.2.0
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
Manually scaled-in TiKV nodes in the cluster, but now I don’t want to scale in anymore. Is there a way to cancel the current Pending Offline status of the TiKV nodes?
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: zhanggame1 | Original post link

There should be no way. By the time you see the reply after posting, the scaling down would have already been completed.

| username: Hacker_nTkchcIf | Original post link

Alright, thank you, expert.

| username: tidb菜鸟一只 | Original post link

Scale down first, then scale up.

| username: DBRE | Original post link

Terminate Offline Process

Nodes in the offline state can have their offline process terminated before they become tombstones by using the following command to make the TiKV node UP again. This does not apply to cases where the TiKV data directory has been deleted or the node has crashed. In some cases, the TiKV node may need to be restarted.

       curl -X POST http://pd_ip:pd_port/pd/api/v1/store/{store_id}/state?state=Up

The offline process described above initially uses the tiup cluster scale-in method. During the scale-in operation, the following process can also be used:

(1) Use pd-ctl store delete to start the offline process, changing the store to offline.

(2) Once the state changes to tombstone, use store remove-tombstone to clean up.

(3) Use tiup cluster scale-in --force to clean up the offline node information.

Reference: 专栏 - TiKV缩容下线异常处理的三板斧 | TiDB 社区