tikv / tikv/pd

rule checker consumes too much cpu in big cluster

Open
#9,011 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

In some big clusters, rule-checker consumes too much cpu

cluster1:
![Image](https://github.com/user-attachments/assets/3072bf7e-67f8-44e2-9509-896bd4a79b9a)

cluster2:
![Image](https://github.com/user-attachments/assets/8c12ff8d-897a-495d-abeb-5b0f124c7046)

There are 107 stores and 180w regions in cluster2, and simple rules.
```
[
{
"group_id": "pd",
"id": "dc1-f",
"start_key": "",
"end_key": "",
"role": "follower",
"is_witness": false,
"count": 2,
"label_constraints": [
{
"key": "dc",
"op": "in",
"values": [
"dc1"
]
}
],
"location_labels": [
"dc",
"host"
],
"create_timestamp": 1736992391
},
{
"group_id": "pd",
"id": "dc1-l",
"start_key": "",
"end_key": "",
"role": "learner",
"is_witness": false,
"count": 1,
"label_constraints": [
{
"key": "dc",
"op": "in",
"values": [
"dc1"
]
}
],
"location_labels": [
"dc",
"host"
],
"create_timestamp": 1736992391
},
{
"group_id": "pd",
"id": "dc2",
"start_key": "",
"end_key": "",
"role": "voter",
"is_witness": false,
"count": 3,
"label_constraints": [
{
"key": "dc",
"op": "in",
"values": [
"dc2"
]
}
],
"location_labels": [
"dc",
"host"
],
"create_timestamp": 1736992391
}
]
```

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.