scheduler: region score are different between log and metrics
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Bug Report
### What did you do?
add a new node
### What did you expect to see?
the cluster is balance
### What did you see instead?
the cluster is no balance and their region score differ a lot, but pd doesn't create operator.

but log is different with metrics
`[2022/09/30 06:54:42.576 +00:00] [DEBUG] [utils.go:124] ["skip balance region"] [scheduler=balance-region-scheduler] [region-id=193894476] [source-store=115121122] [target-store=717892230] [source-size=3230518] [source-score=3590635.5235656626] [source-influence=0] [target-size=68663] [target-score=1193743611.955962] [target-influence=0] [average-region-size=73] [tolerant-resource=16028]`
Because, the score of metrics is `RegionScore(s.opt.GetRegionScoreFormulaVersion(), s.opt.GetHighSpaceRatio(), s.opt.GetLowSpaceRatio(), 0)`
the score of log is `RegionScore(opts.GetRegionScoreFormulaVersion(), opts.GetHighSpaceRatio(), opts.GetLowSpaceRatio(), targetDelta)`
this makes us cannot know why pd doesn't create operator by metrics.
### What version of PD are you using (`pd-server -V`)?
master
Contributor guide
Assessment
This issue has not been assessed yet.