The store is gone but the region is still there and the leader has not been elected. What should I do?

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

Original topic: store已经没有了 region还挂在上面 且leader 没有选举 怎么办

| username: Hacker_ynbNppAC

[TiDB Usage Environment] Production Environment
[TiDB Version] 4.0
[Reproduction Path] After mistakenly deleting the directories of 2 out of 5 TiKV nodes, one node had a status issue, so it was removed and became offline. I want it to become tombstone status and then delete it.
[Encountered Problem: Symptoms and Impact]
[Resource Configuration] 5 TiKV nodes, 3 PD nodes, 2 TiDB nodes
TiKV 2T/node
[Reproduction Path] After mistakenly deleting the directories of 2 out of 5 TiKV nodes, one node had a status issue and later became tombstone.
[Encountered Problem: Symptoms and Impact]
The store is already gone, but the region is still attached to it, and the leader has not been elected.
As shown in the picture, store 4 is a store that no longer exists.

| username: h5n1 | Original post link

Was the store manually set to tombstone? You can first try using pd-ctl operator add remove-peer to manually remove the region from the problematic store. If the region does not have a leader, it will report an error, and you will need to recreate the region or tombstone the region, which will result in data loss.

| username: ffeenn | Original post link

“Accidentally deleted 2 nodes, and one node still has issues.” Does this mean there are only 2 normal nodes now? Please provide a screenshot of the display to check the current cluster status.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.