Skip to content

dxfservice: create store for SYSTEM keyspace#61752

Merged
ti-chi-bot[bot] merged 11 commits into
pingcap:masterfrom
D3Hunter:system-store
Jun 24, 2025
Merged

dxfservice: create store for SYSTEM keyspace#61752
ti-chi-bot[bot] merged 11 commits into
pingcap:masterfrom
D3Hunter:system-store

Conversation

@D3Hunter

@D3Hunter D3Hunter commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #61702

Problem Summary:

What changed and how does it work?

this PR depends on tikv/pd#9393 and tikv/pd#9415

  • init Store with PD client which considers keyspace to use TSO service
  • init a store for SYSTEM keyspace if current keyspace is not SYSTEM, and close on shutdown
  • add GetClusterID to Store interface, so we don't need to get it again
  • add check when bootstrap to make sure SYSTEM keyspace has already bootstrapped and have a larger or equal boostrap version than user keyspace

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

bootstrap SYSTEM keyspace on empty cluster: success
bootstrap user keyspace without SYSTEM bootstrapped: [FATAL] [session.go:3515] ["SYSTEM keyspace is not bootstrapped"]
bootstrap user keyspace with SYSTEM bootstrapped: success
upgrade user keyspace while SYSTEM hasn't: [FATAL] [session.go:3486] ["bootstrap version of user keyspace must be smaller or equal to that of SYSTEM keyspace"] [keyspaceName=mykeyspace] [current=250] [system=249]

  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 16, 2025
@tiprow

tiprow Bot commented Jun 16, 2025

Copy link
Copy Markdown

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@codecov

codecov Bot commented Jun 16, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 54.83871% with 28 lines in your changes missing coverage. Please review.

Project coverage is 74.9725%. Comparing base (1abbbf0) to head (0ea3d4e).
Report is 12 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61752        +/-   ##
================================================
+ Coverage   72.9995%   74.9725%   +1.9729%     
================================================
  Files          1735       1781        +46     
  Lines        481463     493463     +12000     
================================================
+ Hits         351466     369962     +18496     
+ Misses       108467     100397      -8070     
- Partials      21530      23104      +1574     
Flag Coverage Δ
integration 48.8292% <45.1612%> (?)
unit 72.2650% <52.4590%> (+0.0072%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 63.0242% <100.0000%> (+16.3932%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@D3Hunter

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Jun 16, 2025

Copy link
Copy Markdown

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@D3Hunter

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Jun 20, 2025

Copy link
Copy Markdown

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@D3Hunter

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Jun 20, 2025

Copy link
Copy Markdown

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Comment thread pkg/keyspace/doc.go Outdated
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 24, 2025
D3Hunter and others added 2 commits June 24, 2025 11:32
Co-authored-by: tangenta <tangenta@126.com>
@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 24, 2025
@ti-chi-bot

ti-chi-bot Bot commented Jun 24, 2025

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2025-06-24 03:31:09.217242748 +0000 UTC m=+760921.940421724: ☑️ agreed by tangenta.
  • 2025-06-24 05:53:19.555619057 +0000 UTC m=+769452.278798038: ☑️ agreed by wjhuang2016.

@D3Hunter

Copy link
Copy Markdown
Contributor Author

/approve

@ti-chi-bot

ti-chi-bot Bot commented Jun 24, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, Leavrth, tangenta, wjhuang2016, yudongusa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Jun 24, 2025
@ti-chi-bot ti-chi-bot Bot merged commit f701e5a into pingcap:master Jun 24, 2025
26 checks passed
@D3Hunter D3Hunter deleted the system-store branch June 24, 2025 07:16
morgo added a commit to morgo/tidb that referenced this pull request Jun 24, 2025
* origin/master: (129 commits)
  domain: Fix the issue that the min start ts doesn't correctly block keyspace-level GC (pingcap#61925)
  br: better control pd scheduler pause during log restore with filter (pingcap#61819)
  session: rename circuit breaker sysvar (pingcap#61951)
  dxfservice: create store for SYSTEM keyspace (pingcap#61752)
  docs: fix a dead link in CONTRIBUTORS.md (pingcap#61923)
  metrics/nextgengrafana: display keyspace separately (pingcap#61823)
  lightning: fix length check may be skipped for first line (pingcap#61874)
  planner: support `explain [analyze] <plan_digest>` for `explain explore` (pingcap#61942)
  planner: record explored plans into `tidb_statement_stats` when running `explain explore` (pingcap#61850)
  fix(runaway): ensure DistSQLContext's checker is synchronized with session variables (pingcap#61907)
  expression,planner: reuse the propOuterJoinConstSolver to improve performance (pingcap#61913)
  ddl,planner: remove unused and meaningless code (pingcap#61936)
  planner: remove unused field from physicalTableScan. (pingcap#61935)
  workload-learning: Extract metrics from cluster statements stats (pingcap#61378)
  executor: minor cleanup in builder.go (pingcap#61924)
  session: rename GetDomainInfoSchema to GetLatestInfoSchema (pingcap#61894)
  ingest: retry failed regions when batch scatter regions (pingcap#61722)
  planner: add tpch q1,q2,q3 benchmark (pingcap#61898)
  planner: fix uninit timeout for loading bindings (pingcap#61891)
  executor: report error when admin check on multiple tables (pingcap#61828)
  ...
D3Hunter added a commit to D3Hunter/tidb that referenced this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants