Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sessionctx: mark tidb_enable_auto_analyze_priority_queue as deprecated #54088

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

Rustin170506
Copy link
Member

@Rustin170506 Rustin170506 commented Jun 18, 2024

What problem does this PR solve?

Issue Number: ref #50132

Problem Summary:

What changed and how does it work?

Mark tidb_enable_auto_analyze_priority_queue is deprecated. We will always use it in the future because, compared to random selection, it is always better.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test
  • 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_enable_auto_analyze_priority_queue 标记为废弃。
Mark tidb_enable_auto_analyze_priority_queue 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 18, 2024
@Rustin170506
Copy link
Member Author

Tested locally:

  1. Start the cluster with patch: tiup playground v8.1.0 --db.binpath /Volumes/t7/code/tidb/bin/tidb-server
  2. Try to set tidb_enable_auto_analyze_priority_queue:
mysql> set global tidb_enable_auto_analyze_priority_queue = 'OFF';
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> show warnings;
+---------+------+----------------------------------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                                                |
+---------+------+----------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1681 | tidb_enable_auto_analyze_priority_queue will be removed in the future and TiDB will always use priority queue to execute auto analyze. |
+---------+------+----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Copy link
Member Author

@Rustin170506 Rustin170506 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.)

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.9763%. Comparing base (e47330c) to head (28133e7).
Report is 11 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54088         +/-   ##
=================================================
- Coverage   74.8056%   55.9763%   -18.8293%     
=================================================
  Files          1516       1636        +120     
  Lines        360862     605366     +244504     
=================================================
+ Hits         269945     338862      +68917     
- Misses        71325     243318     +171993     
- Partials      19592      23186       +3594     
Flag Coverage Δ
integration 37.0218% <100.0000%> (?)
unit 71.7741% <100.0000%> (-1.9089%) ⬇️

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

Components Coverage Δ
dumpling 52.9656% <ø> (-2.2339%) ⬇️
parser ∅ <ø> (∅)
br 52.6825% <ø> (+4.6877%) ⬆️

Copy link
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 Jun 18, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 18, 2024
Copy link

ti-chi-bot bot commented Jun 18, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-18 15:07:40.44138599 +0000 UTC m=+127386.926874819: ☑️ agreed by elsa0520.
  • 2024-06-18 15:55:57.809829156 +0000 UTC m=+130284.295317987: ☑️ agreed by hawkingrei.

@easonn7
Copy link

easonn7 commented Jun 19, 2024

/approve

Copy link

ti-chi-bot bot commented Jun 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: easonn7, elsa0520, hawkingrei

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

The pull request process is described here

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 19, 2024
@ti-chi-bot ti-chi-bot bot merged commit c455119 into pingcap:master Jun 19, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved component/statistics lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants