Skip to content

mdl: move the set variable check of nextgen from variable pkg to planner#62882

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:masterfrom
D3Hunter:mdl-var-ro
Aug 11, 2025
Merged

mdl: move the set variable check of nextgen from variable pkg to planner#62882
ti-chi-bot[bot] merged 1 commit into
pingcap:masterfrom
D3Hunter:mdl-var-ro

Conversation

@D3Hunter

@D3Hunter D3Hunter commented Aug 7, 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?

in #62865, we forbid setting enableMDL var, but I didn't notice that Domain.rebuildSysVarCache will call SetGlobal directly, which will cause logging of the error setting tidb_enable_metadata_lock is not supported in the next generation of TiDB, although there is no harm, it's not expected, so we move the check to planner of set statement

Check List

Tests

  • Unit test, existing test TestSetMDLInNextGen also work
  • Integration test
  • Manual test (add detailed scripts or steps below)

run nextgen TiDB, there is no log like setting tidb_enable_metadata_lock is not supported in the next generation of TiDB

mysql> set global tidb_enable_metadata_lock=1;
ERROR 1235 (42000): setting tidb_enable_metadata_lock is not supported in the next generation of TiDB
  • 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. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 7, 2025
@tiprow

tiprow Bot commented Aug 7, 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 Aug 7, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 2.77778% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.4145%. Comparing base (8acfef8) to head (f7c75cb).
⚠️ Report is 16 commits behind head on master.

⚠️ Current head f7c75cb differs from pull request most recent head 3193383

Please upload reports for the commit 3193383 to get more accurate results.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #62882        +/-   ##
================================================
+ Coverage   72.8011%   73.4145%   +0.6134%     
================================================
  Files          1792       1822        +30     
  Lines        487624     495787      +8163     
================================================
+ Hits         354996     363980      +8984     
+ Misses       111008     109467      -1541     
- Partials      21620      22340       +720     
Flag Coverage Δ
integration 45.0158% <2.7777%> (?)

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

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 46.3318% <ø> (+0.0076%) ⬆️
🚀 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

D3Hunter commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Aug 7, 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

D3Hunter commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Aug 7, 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

D3Hunter commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Aug 7, 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

D3Hunter commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Aug 7, 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/session/session.go Outdated
Comment thread Makefile Outdated
@D3Hunter

D3Hunter commented Aug 8, 2025

Copy link
Copy Markdown
Contributor Author

/hold

some case keeps failing, investigating, but it runs fine locally, i also see it in other PR, might be some other cases forget to revert the changes to global variables. see #62889

@ti-chi-bot ti-chi-bot Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 8, 2025
@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 8, 2025
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 8, 2025
@wuhuizuo wuhuizuo added the nextgen Indicates that the Issue or PR belongs to the nextgen kernel architecture. label Aug 8, 2025
@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 8, 2025
@ti-chi-bot

ti-chi-bot Bot commented Aug 8, 2025

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2025-08-08 06:20:48.062255343 +0000 UTC m=+594758.205016528: ☑️ agreed by tangenta.
  • 2025-08-08 08:42:31.301500054 +0000 UTC m=+603261.444261219: ☑️ agreed by GMHDBJD.

@D3Hunter

D3Hunter commented Aug 8, 2025

Copy link
Copy Markdown
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 8, 2025
@D3Hunter

D3Hunter commented Aug 8, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Aug 8, 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

D3Hunter commented Aug 8, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Aug 8, 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.

@ti-chi-bot

ti-chi-bot Bot commented Aug 11, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GMHDBJD, hawkingrei, qw4990, tangenta, 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 Aug 11, 2025
@hawkingrei

Copy link
Copy Markdown
Contributor

/ok-to-test

@ti-chi-bot ti-chi-bot Bot added the ok-to-test Indicates a PR is ready to be tested. label Aug 11, 2025
@ti-chi-bot ti-chi-bot Bot merged commit 2a35445 into pingcap:master Aug 11, 2025
25 checks passed
@D3Hunter D3Hunter deleted the mdl-var-ro branch August 11, 2025 05:32
D3Hunter added a commit to D3Hunter/tidb that referenced this pull request Aug 11, 2025
D3Hunter added a commit to D3Hunter/tidb that referenced this pull request Aug 11, 2025
joechenrh pushed a commit to joechenrh/tidb that referenced this pull request Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm nextgen Indicates that the Issue or PR belongs to the nextgen kernel architecture. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants