-
Notifications
You must be signed in to change notification settings - Fork 188
syncer: remove auto_random when track table from downstream #1823
Conversation
@@ -684,6 +684,19 @@ func (s *Syncer) trackTableInfoFromDownstream(tctx *tcontext.Context, origSchema | |||
createStmt.Table.Schema = model.NewCIStr(origSchema) | |||
createStmt.Table.Name = model.NewCIStr(origTable) | |||
|
|||
// schema tracker sets non-clustered index, so can't handle auto_random. |
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.
Although we have turned tidb_enable_clustered_index
off in defaultGlobalVars
, the user can turn it back on via the configuration file, is there a problem if we hard delete the ColumnOptionAutoRandom
there?
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.
the schema tracker is mainly used to
- get column names because they are not written in binlog row events.
- calculate if two row changing can be sent concurrently by PK/UK
- calculate information of optimistic shard DDL
(don't know if I forget something, cc @GMHDBJD )
I think there's no harm to delete ColumnOptionAutoRandom
, but agree we'd better reduce the modification. Will fix later
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
Maybe we can add integration test for |
now the downstream in CI is TiDB v5, so SHOW CREATE TABLE will attach CLUSTERED INDEX column comment, which will not trigger this problem. |
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
[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. |
@lance6716 need fix conflicts |
/merge |
@Ehco1996: 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. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: dd06877
|
In response to a cherrypick label: new pull request created: #1847. |
What problem does this PR solve?
close #1715
What is changed and how it works?
as title
Check List
Tests
Code changes
Side effects
Related changes