How to Recover a TiKV in Pending Offline Status

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

Original topic: 如何恢复Pending Offline状态的tikv

| username: Hacker007

Why can’t I use curl -X POST http://192.168.2.160:2379/pd/api/v1/store/65531082/state?state=Up to bring a TiKV in Pending Offline state back up?

| username: xfworld | Original post link

Pending Offline
is a critical state after the node offline operation. This state is maintained mainly to complete tasks such as leader migration and replica migration. Once these tasks are completed, it will transition to the tombstone state, and the offline operation can be completed.

Allowing elastic scaling up and down already provides significant convenience and ease of use. I’m not sure what your operational goal is?

I personally suggest learning some related knowledge about the TiDB series…

| username: Hacker007 | Original post link

If you want to stop the offline process, this state has been maintained for about four days. Forcing a scale-down might result in data loss.

| username: Hacker007 | Original post link

It’s done. After restarting TiKV, the node status has been restored!

| username: xfworld | Original post link

As long as the number of replicas is sufficient, data will not be lost. Alternatively, you can forcibly evict the region leader of the node when performing the offline process.

| username: xfworld | Original post link

Feel free to mess around in the test environment, but it’s better to be cautious online…