-
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
ddl: implement table granularity DDL for SchemaTracker #36077
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. |
Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: lance6716 <lance6716@gmail.com>
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/6955fd162836d5e4f5e1cb105a43738e70167234 |
@@ -62,13 +63,32 @@ func (d *Checker) Enable() { | |||
d.closed = false | |||
} | |||
|
|||
// CreateTestDB creates a `test` database like the default behaviour of TiDB. | |||
func (d Checker) CreateTestDB() { |
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.
Could move CreateTestDB
and createTestDB
into NewSchemaTracker
function?
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.
in normal DM using case, test
database is not wanted.
ddl/schematracker/checker.go
Outdated
if tableInfo == nil { | ||
errStr := fmt.Sprintf("%s.%s should not exist", dbName, tableName) | ||
panic(errStr) | ||
} | ||
if tableInfo2 == nil { | ||
errStr := fmt.Sprintf("%s.%s should exist", dbName, tableName) | ||
panic(errStr) | ||
} |
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.
ditto
ddl/schematracker/checker.go
Outdated
if dbInfo == nil { | ||
errStr := fmt.Sprintf("%s should not exist", dbName) | ||
panic(errStr) | ||
} | ||
if dbInfo2 == nil { | ||
errStr := fmt.Sprintf("%s should exist", dbName) | ||
panic(errStr) |
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.
Maybe we could combine those lines like
errStr := fmt.Sprintf("inconsistent dbInfo, dbName: %s, real ddl: %p, schematracker:%p", dbName, dbInfo, dbInfo2)
panic(errStr)
I think it's better.
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.
will do it tomorrow
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.
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: b57935e
|
/merge |
/run-check_dev_2 |
TiDB MergeCI notify🔴 Bad News! New failing [2] after this pr merged.
|
* master: (27 commits) executor: parallel cancel mpp query (pingcap#36161) store/copr: adjust the cop cache admission process time for paging (pingcap#36157) log-backup: get can restored global-checkpoint-ts when support v3 checkpoint advance (pingcap#36197) executor: optimize cursor read point get by reading through pessimistic lock cache (pingcap#36149) *: add tidb_min_paging_size system variable (pingcap#36107) planner: handle the expected row count for pushed-down selection in mpp (pingcap#36195) *: support show ddl jobs for sub-jobs (pingcap#36168) table-filter: optimize table pattern message and unit tests (pingcap#36160) domain: fix unstable test TestAbnormalSessionPool (pingcap#36154) executor: check the error returned by `handleNoDelay` (pingcap#36105) log-backup: fix checkpoint display (pingcap#36166) store/mockstore/unistore: fix several issues of coprocessor paging in unistore (pingcap#36147) test: refactor restart test (pingcap#36174) ddl: support rename index and columns for multi-schema change (pingcap#36148) test: remove meaningless test and update bazel (pingcap#36136) planner: Reduce verbosity of logging unknown system variables (pingcap#36013) metrics/grafana: bring back the plan cache miss panel (pingcap#36081) ddl: implement table granularity DDL for SchemaTracker (pingcap#36077) *: bazel use jdk 17 (pingcap#36070) telemetry: add reviewer rule (pingcap#36084) ...
What problem does this PR solve?
Issue Number: ref #35933
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.