Skip to content

variable: mark tidb_index_serial_scan_concurrency as deprecated#64023

Merged
ti-chi-bot[bot] merged 11 commits into
pingcap:masterfrom
0xPoe:peo-patch-index-serial-scan
Oct 21, 2025
Merged

variable: mark tidb_index_serial_scan_concurrency as deprecated#64023
ti-chi-bot[bot] merged 11 commits into
pingcap:masterfrom
0xPoe:peo-patch-index-serial-scan

Conversation

@0xPoe
Copy link
Copy Markdown
Member

@0xPoe 0xPoe commented Oct 18, 2025

What problem does this PR solve?

Issue Number: close #63931

Problem Summary:

What changed and how does it work?

Mark tidb_index_serial_scan_concurrency as deprecated.

We decided in #16999 to deprecate tidb_index_serial_scan_concurrency for controlling the concurrency of sequential scans, but retain its function of controlling the concurrency of index statistics scans.

#50639 We decided to stop using tidb_index_serial_scan_concurrency and instead use the tidb_analyze_distsql_scan_concurrency parameter newly added in the previous PR to control the scan concurrency for index statistical information collection.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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.

将已经没作用的 tidb_index_serial_scan_concurrency 标记为弃用
Mark the obsolete tidb_index_serial_scan_concurrency variable as deprecated

@ti-chi-bot ti-chi-bot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 18, 2025
@0xPoe
Copy link
Copy Markdown
Member Author

0xPoe commented Oct 18, 2025

/retest

@0xPoe 0xPoe requested a review from Copilot October 18, 2025 10:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Mark tidb_index_serial_scan_concurrency as deprecated and ensure it no longer affects execution while still being settable (with a warning).

  • Make tidb_index_serial_scan_concurrency a no-op at session level and emit a deprecation warning on SET.
  • Remove internal concurrency field/methods tied to index serial scan concurrency.
  • Update tests and comments to reflect deprecation and new guidance.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/sessionctx/variable/sysvar.go Deprecates tidb_index_serial_scan_concurrency by making SetSession a no-op and adding a validation warning.
pkg/sessionctx/variable/session.go Removes indexSerialScanConcurrency field and its getters/setters from Concurrency.
pkg/sessionctx/variable/varsutil_test.go Removes tests asserting behavior of the deprecated variable.
pkg/executor/set_test.go Adjusts tests to expect the deprecation warning and drops assertions on internal concurrency effect.
pkg/sessionctx/vardef/tidb_vars.go Adds deprecation and historical behavior documentation for the variable and related analyze scan variable.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread pkg/sessionctx/vardef/tidb_vars.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.8291%. Comparing base (31338c0) to head (c2bb03e).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #64023        +/-   ##
================================================
+ Coverage   72.7400%   73.8291%   +1.0891%     
================================================
  Files          1851       1854         +3     
  Lines        500444     505032      +4588     
================================================
+ Hits         364023     372861      +8838     
+ Misses       114279     110265      -4014     
+ Partials      22142      21906       -236     
Flag Coverage Δ
integration 42.3978% <100.0000%> (?)
unit 72.8925% <100.0000%> (+0.6090%) ⬆️

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

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member Author

@0xPoe 0xPoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔢 Self-check (PR reviewed by myself and ready for feedback)

  • Code compiles successfully

  • Unit tests added

  • All tests pass

  • Bazel files updated

  • Comments added where necessary

  • PR title and description updated

  • Documentation PR created (or confirmed not needed)

  • PR size is reasonable

/cc @elsa0520 @time-and-fate

Copy link
Copy Markdown
Contributor

@elsa0520 elsa0520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 20, 2025
@0xPoe
Copy link
Copy Markdown
Member Author

0xPoe commented Oct 20, 2025

/retest

@0xPoe
Copy link
Copy Markdown
Member Author

0xPoe commented Oct 20, 2025

/hold

I'd like to update more comments for more variables.

@ti-chi-bot ti-chi-bot Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 20, 2025
@0xPoe
Copy link
Copy Markdown
Member Author

0xPoe commented Oct 20, 2025

/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 Oct 20, 2025
@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 20, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Oct 20, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-10-20 08:46:53.344498946 +0000 UTC m=+688719.421751507: ☑️ agreed by elsa0520.
  • 2025-10-20 10:34:33.85561573 +0000 UTC m=+695179.932868289: ☑️ agreed by time-and-fate.

@0xPoe
Copy link
Copy Markdown
Member Author

0xPoe commented Oct 20, 2025

/retest

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Oct 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elsa0520, time-and-fate, 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 Oct 20, 2025
@lance6716
Copy link
Copy Markdown
Contributor

/retest

@0xPoe
Copy link
Copy Markdown
Member Author

0xPoe commented Oct 21, 2025

/test all

@0xPoe
Copy link
Copy Markdown
Member Author

0xPoe commented Oct 21, 2025

/retest

@0xPoe
Copy link
Copy Markdown
Member Author

0xPoe commented Oct 21, 2025

/test all

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Oct 21, 2025

@0xPoe: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow c2bb03e link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot Bot merged commit e22494d into pingcap:master Oct 21, 2025
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Deprecate tidb_index_serial_scan_concurrency variable

6 participants