Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labelLevelStats may leak when merging regions #8700

Closed
rleungx opened this issue Oct 14, 2024 · 2 comments · Fixed by #8703
Closed

labelLevelStats may leak when merging regions #8700

rleungx opened this issue Oct 14, 2024 · 2 comments · Fixed by #8703
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.4 severity/major type/bug The issue is confirmed as a bug.

Comments

@rleungx
Copy link
Member

rleungx commented Oct 14, 2024

Bug Report

Consider the following case:

  1. Patrol region has scanned a batch of regions, e.g., a,b,c,d
  2. Before updating label statistics, the merge finished, e.g., merge a and b
  3. PD will remove one of the regions, assumed b, from label statistics because of overlaps during the process of region heartbeat.
  4. Then patrol region update a,b,c,d to label statistics

b will never be deleted again and left in memory until the PD is restarted.

@rleungx rleungx added the type/bug The issue is confirmed as a bug. label Oct 14, 2024
@rleungx rleungx added affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. labels Oct 15, 2024
@okJiang
Copy link
Member

okJiang commented Oct 15, 2024

This issue only affects metrics?

@lhy1024
Copy link
Contributor

lhy1024 commented Oct 16, 2024

This issue only affects metrics?

If the cluster has a high frequency of merge regions, this may cause memory growth.

@ti-chi-bot ti-chi-bot bot closed this as completed in 26123dc Oct 16, 2024
ti-chi-bot bot pushed a commit that referenced this issue Oct 22, 2024
close #8700

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <admin@liudos.us>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue Oct 30, 2024
close tikv#8700

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot added a commit that referenced this issue Oct 31, 2024
close #8700

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <admin@liudos.us>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue Dec 5, 2024
close tikv#8700

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot added a commit that referenced this issue Dec 9, 2024
close #8700

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <liuhanyang@pingcap.com>
Co-authored-by: lhy1024 <admin@liudos.us>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this issue Dec 11, 2024
close tikv#8700

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot added a commit that referenced this issue Dec 12, 2024
close #8700

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <liuhanyang@pingcap.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.4 severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants