Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: curl -X DELETE pd api问题
[TiDB Usage Environment] Production Environment
6.5
[Reproduction Path] What operations were performed to cause the issue
Accidentally deleted a TiKV node, forcibly took it offline on the original server, and then brought it back online
[Encountered Issue: Problem Description and Impact]
Does anyone know where this API comes from http://xxx3:2379/pd/api/v1/store/84?force=true? I can’t find it on the official website.
What are you going to do? This delete force=true is suitable for use when marking TiKV as offline directly after physically deleting TiKV.
In the older version, you could operate PD through the API without using TiUP. Now, you can just use TiUP directly.
In fact, it is also written on the official website: TiDB 集群监控 API | PingCAP 文档中心
He is probably trying to use this to forcibly take the TiKV offline.
I used this to forcibly delete the PD store information, otherwise, it couldn’t be expanded.
If you don’t execute this, it will report an error: » store delete 203084
Failed to delete store 203084: [400] “[PD:core:ErrStoresNotEnough]cannot remove store 203084 since the number of up stores would be 2 while need 3”
This deletion is risky. If multiple deletions occur, it may result in the loss of the majority of replicas in some regions.
Why do you want to do this? Turning 3 into 2?
The data directory of the deleted node has been cleared, so it can only be forcibly taken offline.
This parameter cannot be modified using pd-ctl, right?
Just execute it, and after execution, the TiKV started by that node can be used. Wait until the replicas are replenished before performing other operations.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.