Open CabinfeverB opened 2 years ago
If there is some move-peer operator which is from A->B, B's influence will increase. So PD will try to move peers from B to C. But we don't want to balance around. So following code is useful. https://github.com/tikv/pd/blob/d7435da069ab96b91b9e6a6686a394cce6f42390/server/schedulers/utils.go#L91-L97
ps: I think the comments here should be clearer
But I think changing positive value into negative value is a bit excessive. Consider the following scenario
[Score] A,B,C = 5,3,1 [Schedule] A->B, A->C [Score with influence] A,B,C = 3,4,2 [want to Schedule] B->C [Score in shouldBalance] A,B,C = 3,2,2
shouldBalance
So we can't move peer from B to C. IMO, we can change positive value into zero
/cc @bufferflies
Enhancement Task
If there is some move-peer operator which is from A->B, B's influence will increase. So PD will try to move peers from B to C. But we don't want to balance around. So following code is useful. https://github.com/tikv/pd/blob/d7435da069ab96b91b9e6a6686a394cce6f42390/server/schedulers/utils.go#L91-L97
ps: I think the comments here should be clearer
But I think changing positive value into negative value is a bit excessive. Consider the following scenario
So we can't move peer from B to C. IMO, we can change positive value into zero