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

schedule: if aba modification occurs, split-merge-interval will not take effect #8404

Closed
lhy1024 opened this issue Jul 16, 2024 · 1 comment · Fixed by #8405
Closed

schedule: if aba modification occurs, split-merge-interval will not take effect #8404

lhy1024 opened this issue Jul 16, 2024 · 1 comment · Fixed by #8405
Labels
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. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@lhy1024
Copy link
Contributor

lhy1024 commented Jul 16, 2024

Bug Report

What did you do?

test merge and split region

  1. start a cluster while split-merge-interval is 1s
  2. merge empty regions
  3. set split-merge-interval to 1h
  4. split some regions
  5. again set split-merge-interval to 1s

What did you expect to see?

merge empty region

What did you see instead?

image

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

@lhy1024 lhy1024 added the type/bug The issue is confirmed as a bug. label Jul 16, 2024
@lhy1024
Copy link
Contributor Author

lhy1024 commented Jul 16, 2024

Because we first check whether recently started rather update config, which is introduced after #4616

expireTime := m.startTime.Add(m.conf.GetSplitMergeInterval())
if time.Now().Before(expireTime) {
mergeCheckerRecentlyStartCounter.Inc()
return nil
}
m.splitCache.UpdateTTL(m.conf.GetSplitMergeInterval())
if m.splitCache.Exists(region.GetID()) {
mergeCheckerRecentlySplitCounter.Inc()
return nil
}
// when pd just started, it will load region meta from region storage,
if region.GetLeader() == nil {
mergeCheckerNoLeaderCounter.Inc()
return nil
}

step splitCache.ttl region.ttl
start a cluster while split-merge-interval is 1s 1s -
set split-merge-interval to 1h 1s, because recently start, no update -
split some regions 1s 1h
again set split-merge-interval to 1s 1s, and no update 1h

@lhy1024 lhy1024 added severity/moderate 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 Jul 16, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 1ad446e Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. severity/moderate type/bug The issue is confirmed as a bug.
Projects
Development

Successfully merging a pull request may close this issue.

1 participant