Skip to content

[scalability] Index keyspace region-label rules incrementally #11030

Description

@rleungx

Enhancement Task

Problem

Adding or deleting one canonical keyspace region-label rule rebuilds and sorts the complete generic range index while holding the RegionLabeler exclusive lock. Scheduling Service repeats that rebuild after its etcd watch event. At large keyspace counts this makes single-keyspace operations and restart readiness depend on O(K log K) work and a high transient memory peak.

Expected behavior

  • A single keyspace-rule add/delete does not traverse or sort all existing rules.
  • RawKV-disabled and RawKV-enabled label semantics remain unchanged.
  • Startup indexing has bounded memory and a documented readiness target.
  • Scale benchmarks cover startup and lock-held single-rule updates at 100k and 1M rules.

This is the upstream counterpart of https://github.com/tidbcloud/pd-cse/issues/560.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions