Adding a new TiFlash node, can't the old TiFlash regions automatically balance to the new TiFlash?

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

Original topic: 新加一个tiflash节点,原来旧的tiflash region不能自动均衡到新的tiflash上么?

| username: lindoubled

Adding a new TiFlash node, I found that the old TiFlash regions do not automatically migrate to this new TiFlash node.

Version: 5.3.0


| username: ablewang_xiaobo | Original post link

TiFlash probably doesn’t have the same automatic balancing mechanism as TiKV.

| username: songxuecheng | Original post link

Set the TiFlash replica to the corresponding number of TiFlash instances for high availability. If you need to migrate replicas to other TiFlash instances, you need to do it manually. enable-for-tiflash is a switch that controls whether hotspot scheduling is effective for TiFlash. It is usually turned on, and if turned off, there will be no hotspot scheduling between TiFlash instances.

| username: ddhe9527 | Original post link

Yes, there is. I adjusted the weight of TiFlash, and the region was immediately scheduled, migrating from one TiFlash to another.

| username: lindoubled | Original post link

Where is the enable-for-tiflash parameter set?

| username: lindoubled | Original post link

I enabled the shuffle-region-scheduler scheduling, and TiFlash can automatically balance.

| username: songxuecheng | Original post link

enable-for-tiflash can be set using pd-ctl. It is generally true by default.
shuffle-region-schedule schedules the learner.

| username: lindoubled | Original post link

Okay, it seems that there isn’t much documentation about shuffle-region-schedule. What is it mainly used for?

| username: songxuecheng | Original post link

scheduler add shuffle-region-scheduler: Randomly schedule Regions on different stores
Supports learner

| username: lindoubled | Original post link

Will it keep scheduling, or will it stop scheduling once balanced?

| username: songxuecheng | Original post link

After completion, it should not be continuously scheduled. You can use
scheduler show to check.

| username: ddhe9527 | Original post link

Does the region-balance-scheduler not schedule learners?

| username: ablewang_xiaobo | Original post link

Where is the setting? Please share.

| username: songxuecheng | Original post link

balance-region-scheduler: Keeps the Peers balanced across different nodes.

| username: lindoubled | Original post link

It is estimated that this is only for TiKV.

| username: ddhe9527 | Original post link

Isn’t Peer inclusive of Learner?

| username: songxuecheng | Original post link

Yes, including all peers. I remember that the previous shuffle-region-schedule did not support learners. Which version was upgraded?
The region-balance-scheduler will score based on…

| username: ddhe9527 | Original post link

The region-balance-scheduler is created by default, so in the scenario described by the original poster, I understand that TiFlash Regions should be automatically scheduled to the new node without needing to create the shuffle-region-scheduler. Is that correct?

| username: songxuecheng | Original post link

Yes, it looks like he has mixed two TiFlash instances on the same machine.

| username: lindoubled | Original post link

This doesn’t seem to be related, hybrid deployment is quite normal.