Problem Type (问题类型)
None
Before submit
Environment (环境信息)
- Server Version: 1.7.0
- Backend: Hstore
- OS: CentOS
Your Question (问题描述)
I pulled the latest source code and built a deployment package. Then I deployed a cluster on my servers, including 5 Store nodes, 3 PD nodes, and 3 Server nodes, with the replica number configured as 3. The deployment was done directly by extracting the packages, without using Docker.
I am currently simulating possible failures that may occur in a production environment and trying to determine a reasonable recovery procedure. The failure scenario I have simulated so far is as follows:
I disconnected the data disk of the second Store node while keeping its system disk running normally (the Store process is running on the system disk). I found that the Store node was still shown as UP, but queries involving data stored on the second Store node would fail.
This behavior is acceptable from my perspective because it indicates that the heartbeat mechanism only checks whether the Store process is alive and does not verify the integrity or availability of the underlying data. After that, I stopped the second Store process manually. The status of the second Store node changed from UP → OFFLINE, and cluster queries returned to normal.
I then checked the replica status. The shards that were originally leaders on the second Store node were switched to followers, and the corresponding shard status became OFFLINE. At this point, I believe the behavior is expected and there are no issues.
However, the next scenario I would like to simulate is a case where the data on the second Store node is permanently lost and cannot be recovered. In this situation, I expect to remove the offline second Store node from the current metadata and then restart this node as a new Store node (equivalent to replacing the failed node with a fresh node).
However, I am not sure what the correct procedure is to achieve this.
I have tried several approaches, but I was unable to make the replicas migrate from the failed second Store node to other available Store nodes.
For example, I tried calling the previously mentioned API:
and setting the second Store node status to Tombstone.
After changing the status to Tombstone, I can confirm through:
that the Store status has changed to Tombstone.
However, when checking:
I found that the shards are still assigned to the Tombstone Store node, and no shard migration or replica recovery has occurred.
Therefore, I would like to know:
- What is the recommended recovery workflow when a Store node's data is permanently lost?
- How should an offline/tombstone Store node be removed from PD metadata?
- How can the replicas on the failed Store node be automatically migrated to healthy Store nodes?
- If replacing the failed Store node with a new empty node, what is the correct procedure to trigger replica rebuilding?
Thank you very much for your help.
Problem Type (问题类型)
None
Before submit
Environment (环境信息)
Your Question (问题描述)
I pulled the latest source code and built a deployment package. Then I deployed a cluster on my servers, including 5 Store nodes, 3 PD nodes, and 3 Server nodes, with the replica number configured as 3. The deployment was done directly by extracting the packages, without using Docker.
I am currently simulating possible failures that may occur in a production environment and trying to determine a reasonable recovery procedure. The failure scenario I have simulated so far is as follows:
I disconnected the data disk of the second Store node while keeping its system disk running normally (the Store process is running on the system disk). I found that the Store node was still shown as UP, but queries involving data stored on the second Store node would fail.
This behavior is acceptable from my perspective because it indicates that the heartbeat mechanism only checks whether the Store process is alive and does not verify the integrity or availability of the underlying data. After that, I stopped the second Store process manually. The status of the second Store node changed from UP → OFFLINE, and cluster queries returned to normal.
I then checked the replica status. The shards that were originally leaders on the second Store node were switched to followers, and the corresponding shard status became OFFLINE. At this point, I believe the behavior is expected and there are no issues.
However, the next scenario I would like to simulate is a case where the data on the second Store node is permanently lost and cannot be recovered. In this situation, I expect to remove the offline second Store node from the current metadata and then restart this node as a new Store node (equivalent to replacing the failed node with a fresh node).
However, I am not sure what the correct procedure is to achieve this.
I have tried several approaches, but I was unable to make the replicas migrate from the failed second Store node to other available Store nodes.
For example, I tried calling the previously mentioned API:
and setting the second Store node status to Tombstone.
After changing the status to Tombstone, I can confirm through:
that the Store status has changed to Tombstone.
However, when checking:
I found that the shards are still assigned to the Tombstone Store node, and no shard migration or replica recovery has occurred.
Therefore, I would like to know:
Thank you very much for your help.