Skip to content

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

Closed
@lhy1024

Description

@lhy1024

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)?

Activity

lhy1024

lhy1024 commented on Jul 16, 2024

@lhy1024
ContributorAuthor

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
added
affects-6.1This bug affects the 6.1.x(LTS) versions.
affects-6.5This bug affects the 6.5.x(LTS) versions.
affects-7.1This bug affects the 7.1.x(LTS) versions.
affects-7.5This bug affects the 7.5.x(LTS) versions.
affects-8.1This bug affects the 8.1.x(LTS) versions.
on Jul 16, 2024
added a commit that references this issue on Jul 17, 2024
1ad446e

1 remaining item

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.severity/moderatetype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    • Status

      Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      schedule: if aba modification occurs, split-merge-interval will not take effect · Issue #8404 · tikv/pd