-
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
brie: fix the problem that ddl restored by BR via SQL is not replicated to downstream #22862
base: master
Are you sure you want to change the base?
Conversation
/cc 3pointer,kennytm |
/lgtm |
/unlabel sig/infra |
/label sig/migrate |
@lichunzhu: Those labels are not set on the issue: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/remove-sig sql-infra |
@lichunzhu: Those labels are not set on the issue: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
@lichunzhu: Those labels are not set on the issue: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/remove-sig execution |
For implementation of |
I prefer not to re-use |
/cc overvenus |
executor/brie.go
Outdated
const ( | ||
defaultCapOfCreateTable = 512 | ||
defaultCapOfCreateDatabase = 64 | ||
brViaSQLComment = `/*from(br_via_sql)*/` |
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.
Should we distinguish br via sql
with br
https://github.com/pingcap/br/blob/master/pkg/gluetidb/glue.go#L30?
Or we can set this to /*from(br)*/
since we will merge br into tidb in the future.
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.
/*from(br)*/
+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.
Rest LGTM
@lichunzhu: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@lichunzhu: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What problem does this PR solve?
Problem Summary:
The cluster topology: TiDB -> TiCDC/TiDB-Binlog -> MySQL.
When I use BR via SQL to restore tables to the upstream TiDB, the downstream MySQL hadn't received the correct create table DDL job. This problem is similar to pingcap/br#406.
What is changed and how it works?
What's Changed: Add show create database/table function and set the SQL to session.
How it Works:
The following CreateTableWithInfo/CreateSchemaWithInfo will get the create SQL from the session.
Related changes
Check List
Tests
Test use the hotfix TiDB to do restore job with TiCDC/TiDB-Binlog. The downstream MySQL can create tables successfully.
Release note