Skip to content
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

binlog: use node.Restore() to add TiDB-specified feature comments #31147

Closed
bb7133 opened this issue Dec 29, 2021 · 0 comments · Fixed by #31148
Closed

binlog: use node.Restore() to add TiDB-specified feature comments #31147

bb7133 opened this issue Dec 29, 2021 · 0 comments · Fixed by #31148
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@bb7133
Copy link
Member

bb7133 commented Dec 29, 2021

Enhancement

For TiDB-specified features like AUTO_RANDOM attributes, we comment them in TiDB-specified comments for binlog-based replication(deprecated, but still used by some customers) and TiCDC.

After pingcap/tiflow#3755, TiCDC used the node.Restore() method from parser to add the comments in pingcap/tiflow#3845, rather than the regex-based way for binlog.

Although using node.Restore() is slower than regex, IMO it's better to adopt node.Restore() to replace the regex implementation for basically 2 reasons:

  • It is robust.
  • It makes consistent results for both binlog and TiCDC replications.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant