plancement/region_rule_cache: redundant return values for CheckAndGetCache
Open
type/enhancement
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Enhancement Task
For the function `CheckAndGetCache` , it returns an bool and the value in cache if check success, it will always returns false with value nil and returns true with value not nil, so could we remove the boolean value?
[https://github.com/tikv/pd/blob/c8775b6176a03eb25cb1622fc46ba1d496872df7/server/schedule/placement/region_rule_cache.go#L56-L72](https://github.com/tikv/pd/blob/c8775b6176a03eb25cb1622fc46ba1d496872df7/server/schedule/placement/region_rule_cache.go#L56-L72)
Contributor guide
Assessment
This issue has not been assessed yet.