How to Determine if TIKV Scaling is Complete

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

Original topic: 如何获取TIKV是否扩容完成

| username: Hacker_5KEgzcj2

[TiDB Usage Environment] Production Environment
[Encountered Problem: Problem Phenomenon and Impact]
When expanding TIKV, where can I get the expansion progress, expansion speed, or whether the expansion is ultimately completed?

| username: h5n1 | Original post link

If there are no errors during the scale-out operation, it means the scale-out is complete. After the scale-out is complete, you need to balance the leaders/regions. Check the monitoring overview → tikv → leader and region.

| username: Hacker_5KEgzcj2 | Original post link

Currently, we are doing control, so it is not very convenient to confirm through monitoring. Is there any relevant content in pd-ctl that can be used to judge?

| username: h5n1 | Original post link

Check information_schema.tikv_store_status.

| username: 我是咖啡哥 | Original post link

Actually, you can consider the expansion complete when the node status is OK. Use tiup cluster display to check the status. The subsequent data balancing has nothing to do with the expansion; it’s a background job, and data balancing will occur even without expansion.

| username: Hacker_rETwjAga | Original post link

The expansion is very fast, basically completed as soon as it is executed. You can use tiup cluster display [cluster_name] to check. Generally, if there are no errors during the expansion, it is considered successful. However, data rebalancing is slow. The expansion is only fully completed when the regions and leaders are successfully scheduled. Are you asking about the complete expansion? This scheduling, including leader scheduling, sometimes requires manual weight adjustment. Check the monitoring to see if the number of leaders and regions on the new node is balanced with other nodes, then the expansion is basically complete. You can also connect to PD to check the schedule.

| username: Raymond | Original post link

When the command to scale out TiKV does not report an error, it means the scaling out was successful. However, the backend will perform region balancing. You can check the Grafana monitoring under tikv-details → Cluster → region to see if the regions of each TiKV instance are becoming evenly distributed. If the regions of each TiKV instance are almost evenly distributed, it means the region balancing is nearly complete.

| username: tony5413 | Original post link

Check the logs.

| username: xingzhenxiang | Original post link

tidb-test is your cluster name

| username: Running | Original post link

You can see it by using tiup cluster display tidbclustername.

| username: Hacker_5KEgzcj2 | Original post link

Could you please explain in more detail how to connect to PD to check the schedule? I haven’t used this before.

| username: Hacker_5KEgzcj2 | Original post link

Well, actually I still want to know when the balancing is completed. Because if the program has to determine it through monitoring, it feels a bit difficult to operate.

| username: Hacker_5KEgzcj2 | Original post link

Okay, I’ll take a look.

| username: Hacker_5KEgzcj2 | Original post link

You can check the disk usage of each TiKV and the number of leaders here, which is quite in line with expectations. We will study the feasibility further, thank you.

| username: system | Original post link

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