The store on the offline TiKV node has not been truly deleted

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

Original topic: 已经下线的 tikv 节点上的 store 没有真正被删除

| username: withseid

By executing the command

tiup ctl:v5.3.0 pd -u host:port store | grep "id\""

to view all stores, you can see the following information:

"id": 1,
"id": 4,
"id": 256612,
"id": 527844,

This means that the current TiDB cluster has only 4 stores, which are id 1, 4, 256612, and 527844. However, through Grafana, it is found that there is an additional store-0. Store-0 should be on a machine that has been taken offline before, but it has not been cleared.

I would like to ask how to clear this store-0.

| username: Meditator | Original post link

tiup ctl:v5.3.0 pd -u host:port store 0 to check the status of the store with id=0

| username: Kongdom | Original post link

The image you uploaded is not visible. Please provide the text you need translated.

| username: withseid | Original post link

Failed to get store: [404] "store 0 not found", it shows not found, but I don’t know why there is still store-0 information in Grafana.

| username: withseid | Original post link

That node has already been taken offline. I remember executing the prune command before. Previously, due to machine issues, the --force command was used to forcefully take it offline.

| username: Kongdom | Original post link

Grafana might be caching. If the scaling down occurred within the query time range, the display is normal. If the scaling down occurred outside the query time range, the display is abnormal. You can try restarting the component to see if it has any effect.

| username: withseid | Original post link

Found the previous post, tikv scale-in 后处于 Tombstone 因机器无法通信,导致无法成功执行 prune 命令 - TiDB 的问答社区

| username: Kongdom | Original post link

Oh, so after using --force, you still need to manually delete that store.

| username: withseid | Original post link

The machine where store-0 is located has been offline for about two or three months. The Grafana data in the article is from today, so should I restart the Grafana component and check again?

| username: withseid | Original post link

Then I’ll go to the official website to find the command to manually delete a specific store and give it a try.

| username: Kongdom | Original post link

Is there no node corresponding to store-0 in the tiup cluster display? If it is already gone, then try restarting the Grafana component.

| username: Kongdom | Original post link

Isn’t the link you posted the command to delete the store?

| username: withseid | Original post link

Yes, that’s correct, there’s nothing else. However, there’s some background information that needs to be explained: previously, the machine where store-0 was located was scaled down, and after reinstalling the system, it was scaled back up.

| username: withseid | Original post link

I did execute this command before, so theoretically store-0 should indeed have been deleted. Executing tiup ctl:v5.3.0 pd -u http://10.20.70.39:12379 store also indeed does not find any information about store-0.

| username: Kongdom | Original post link

Then it should be gone. Try restarting the component.

| username: withseid | Original post link

After restarting the Grafana component, you can still see the information of store-0 in the KV Request 99 By store section of TiDB-Summary in Grafana.

| username: Kongdom | Original post link

:thinking: I’ve encountered this situation before. I forced a scale-in and then a scale-out, which led to information confusion. Later, I performed a normal scale-in and scale-out again, and it resolved the issue.

| username: withseid | Original post link

However, at this point, the node that was forcibly scaled down is already gone, and I can no longer scale down the node where store-0 is located.

| username: withseid | Original post link

There is no presence of store-0 in the related monitoring of PD.

| username: Kongdom | Original post link

Do you mean that store-0 is only in that one view?