tikv / tikv/pd

server/schedulers: could we maintain the `OpInfluence` in the cache as an attribute for `OperatorController`?

Open
#5,171 0 comments 1 reaction 0 assignees View on GitHub
type/enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.