tikv / tikv/pd

metrics: the number of oversized-region-count may changed frequently and can not be used as a reference.

Open
#8,917 1 comment 0 reactions 0 assignees View on GitHub
affects-8.1 affects-8.5 report/customer severity/moderate type/bug
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Bug Report

When the configuration of tikv instances in the cluster are not keep consistent,
the number of oversized-region-count may changed frequently and can not be used as a reference.

### What did you do?

make the configuration `region-max-size` and `region-max-keys` not the same between tikv instances.

### What did you expect to see?

I have no idea

### What did you see instead?

the number of oversized-region-count may changed frequently and can not be used as a reference.

### What version of PD are you using (`pd-server -V`)?
master

PD will randomly pull configuration from a TiKV and persist it locally(ref [pd/server/cluster/cluster.go at release-8.1 · tikv/pd](https://github.com/tikv/pd/blob/release-8.1/server/cluster/cluster.go#L507-L547) ).
If the configuration `region-max-size` and `region-max-keys` not the same between tikv instances, PD will pick the one it get recently and use it (`region-max-size` and `region-max-keys`) to determine if a region is oversized [pd/pkg/core/region.go at 03488a478cd395d3bbbdc0a3f64abca5d69fcdc6 · tikv/pd](https://github.com/tikv/pd/blob/03488a478cd395d3bbbdc0a3f64abca5d69fcdc6/pkg/core/region.go#L314-L317) , that is the root caused that the number of oversized regions changed frequently

Workaround: adjust the configuration region-max-size and region-max-keys of all tikv instances in the cluster to be consistent.

Impact: There is no specific impact on performance, but the number of oversized regions on region healthy cannot be used as a reference.

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.