-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
statistics: update some vars for internal sessions correctly (#53977) #53986
statistics: update some vars for internal sessions correctly (#53977) #53986
Conversation
@hi-rustin Do we really need it for 7.1? |
Tesed locally:
After change:
Test step:
logutil.BgLogger().Info("analyze partition concurrency", zap.Int("concurrency", partitionStatsConcurrency))
SET @@global.tidb_analyze_partition_concurrency = 4;
CREATE TABLE test.my_table (
id INT PRIMARY KEY,
name VARCHAR(255),
value INT,
big_number BIGINT,
INDEX idx_big_number (big_number)
);
INSERT INTO test.my_table (id, name, value, big_number)
WITH RECURSIVE numbers AS (
SELECT 1 as n
UNION ALL
SELECT n + 1 FROM numbers WHERE n < 1000
)
SELECT
n as id,
CONCAT('Name_', n) as name,
FLOOR(RAND() * 1000) as value,
n * 1000000000 + FLOOR(RAND() * 1000000000) as big_number
FROM numbers;
SELECT @@global.tidb_analyze_partition_concurrency;
|
Signed-off-by: Rustin170506 <[email protected]>
c30c010
to
c44850d
Compare
7.1 doesn't have |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, Rustin170506 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 |
[LGTM Timeline notifier]Timeline:
|
/retest |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-7.1 #53986 +/- ##
================================================
Coverage ? 73.4932%
================================================
Files ? 1212
Lines ? 381439
Branches ? 0
================================================
Hits ? 280332
Misses ? 83200
Partials ? 17907 |
This is an automated cherry-pick of #53977
What problem does this PR solve?
Issue Number: close #53972
Problem Summary:
What changed and how does it work?
We need to always update these vars for internal sessions. Otherwise, it won't work. And we will use the wrong default value.
See more at the issue.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.