tikv / tikv/pd

plancement/region_rule_cache: redundant return values for CheckAndGetCache

Open
#5,202 0 comments 0 reactions 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
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

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.