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

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
@github-actions github-actions bot added this to Need Triage in Questions and Bug Reports 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

1 participant