-
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
br: fix compatibility issue with concurrent ddl #36474
br: fix compatibility issue with concurrent ddl #36474
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
br/pkg/version/version.go
Outdated
// CheckVersionForDDL checks whether we use queue or table to execute ddl during restore. | ||
func CheckVersionForDDL(s *metapb.Store, tikvVersion *semver.Version) error { | ||
// use tikvVersion instead of tidbVersion since br doesn't have mysql client to connect tidb. | ||
if tikvVersion.Major < 6 || (tikvVersion.Major == 6 && tikvVersion.Minor <= 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use compare method
// use tikvVersion instead of tidbVersion since br doesn't have mysql client to connect tidb. | ||
if tikvVersion.Major < 6 || (tikvVersion.Major == 6 && tikvVersion.Minor <= 1) { | ||
log.Info("detected the old version of tidb cluster. set enable concurrent ddl to false") | ||
variable.EnableConcurrentDDL.Store(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to set it back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this variable only works for br when br exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/hold |
/unhold |
/run-check_dev_2 |
/run-mysql-test |
/run-unit-test |
3532d7f
to
175fd85
Compare
/run-unit-tests |
81da308
to
5c30510
Compare
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/3f99fa2a18859ca53fb9340c797c03b56865adc0 |
/run-integration-br-tests |
/run-integration-br-tests |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 20393e2
|
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-6.1 in PR #36488 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-6.2 in PR #36489 |
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
…rimary-key * upstream/master: (104 commits) br: fix compatibility issue with concurrent ddl (pingcap#36474) infoschema: fix PromQL for `tidb_distsql_copr_cache` (pingcap#36450) test: stabilize TestTopSQLCPUProfile (pingcap#36468) parser: add support of 'ADMIN SHOW DDL JOB QUERIES LIMIT m OFFSET n' transferring to AST (pingcap#36285) *: enable flaky test for all test (pingcap#36385) expression: fix return type of agg func `bit_or` when handling varbinary column (pingcap#36415) executor: fix aggregating enum zero value gets different results from mysql (pingcap#36208) server: skip check tiflash version (pingcap#36451) *: Minor update to SECURITY.md to improved clarity (pingcap#36346) table partition: add telemetry for partition table (pingcap#36204) ddl: invalid multiple MAXVALUE partitions (pingcap#36329) (pingcap#36345) planner: Fixed `Merge` hint in nested CTE (pingcap#36432) metric: impove concurrency ddl metrics (pingcap#36405) planner: add more test cases for leading outer join (pingcap#36409) ddl: only set concurrent variable if no error (pingcap#36437) ddl: fix update panic in the middle of multi-schema change (pingcap#36421) session: Mising OptimizeWithPlanAndThenWarmUp in prepare-execute path (pingcap#36347) executor,metrics: add a metric for observing execution phases (pingcap#35906) br: unified docker image align with tidb (pingcap#36016) ddl: skip to close nil sessPool (pingcap#36425) ...
What problem does this PR solve?
Issue Number: close #36453
Problem Summary:
After concurrent DDL feature implemented. v6.2 cluster will use a new way(ddl table) to execute ddls. but when using v6.2 br to restore cluster to v6.1 doesn't have such ddl tables.
What is changed and how it works?
This PR add a check. when using br (> v6.2) restore cluster (< v6.1). br will disable the switch of concurrent ddl.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.