server/schedulers: could we maintain the `OpInfluence` in the cache as an attribute for `OperatorController`?
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Enhancement Task
Could we maintain the `OpInfluence` in the cache as an attribute for `OperatorController` once `balance-region` schedule or `blance-leader` sheduler enabled?
It seems the function `GetOpInfluence` was try to compute the influence caused by current operator order by stores, and the result was changed by the status of operators maintained `OperatorController`, so if there are lots of operators, it seems more efficient to maintain this value in the cache as an attribute of `OperatorContrroller`
[https://github.com/tikv/pd/blob/c8775b6176a03eb25cb1622fc46ba1d496872df7/server/schedule/operator_controller.go#L797-L809](https://github.com/tikv/pd/blob/c8775b6176a03eb25cb1622fc46ba1d496872df7/server/schedule/operator_controller.go#L797-L809)
Contributor guide
Assessment
This issue has not been assessed yet.