-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: Support flashback schema #37438
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. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/28ba8e5e344e6264a27d373f19fecdd022aa3494 |
a7e8013
to
4c91ac1
Compare
ddl/schematracker/checker.go
Outdated
// RecoverSchema implements the DDL interface. | ||
func (d Checker) RecoverSchema(ctx sessionctx.Context, recoverSchemaInfo *ddl.RecoverSchemaInfo) (err error) { | ||
//TODO implement me | ||
panic("implement me") |
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.
@lance6716 Could you give some descriptions/suggestions on the semantic of RecoverSchema
of Checker
/SchemaTracker
?
I can see that some tools integration tests failed because of this: https://github.com/pingcap/tidb/runs/8089302161
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 return nil. Because SchemaTracker is used to track MySQL DDL, and MySQL will not generate RecoverSchema.
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.
Dumpling tests have started to fail several days ago, not related to Checker
/SchemaTracker
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.
Dumpling tests have started to fail several days ago, not related to
Checker
/SchemaTracker
Got it, thanks for the update.
28ba8e5
to
f3e9324
Compare
ddl/schema.go
Outdated
recoverSchemaInfo *RecoverSchemaInfo | ||
recoverSchemaCheckFlag int64 | ||
) | ||
const checkFlagIndexInJobArgs = 1 // The index of `recoverSchemaCheckFlag` in job arg list. |
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.
Please change it to global level so that it could be shared by different functions(like this one and onRecoverTable
).
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.
Done. PTAL ,Thx~
@erwadba Seems had some maybe could use script below git filter-branch --force --env-filter '
if [ "$GIT_AUTHOR_NAME" = "root" ]
then
export GIT_AUTHOR_NAME="erwadba"
export GIT_AUTHOR_EMAIL="erwadba@hotmail.com"
fi
' 826c15c8..HEAD |
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
Signed-off-by: xhe <xw897002528@gmail.com>
e247e9d
to
25e0bc4
Compare
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 25e0bc4
|
/run-build |
/run-unit-test |
Hi @erwadba, could you add a doc for this feature, just like https://docs.pingcap.com/zh/tidb/stable/sql-statement-flashback-table#flashback-table do. |
What problem does this PR solve?
Issue Number: close #20463
Problem Summary:
What is changed and how it works?
1.Add RecoverSchemaInfo struct contains SchemaInfo and TableInfo.
2.Add recoverSchema code logical like the recovertable .
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.