-
Notifications
You must be signed in to change notification settings - Fork 973
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
Canal starts sync by GTID #146
Conversation
canal/sync.go
Outdated
) | ||
|
||
var ( | ||
expAlterTable = regexp.MustCompile("(?i)^ALTER\\sTABLE\\s.*?`{0,1}(.*?)`{0,1}\\.{0,1}`{0,1}([^`\\.]+?)`{0,1}\\s.*") | ||
) | ||
|
||
func (c *Canal) startSyncBinlog() error { | ||
pos := c.master.Position() | ||
func getSyncer(c *Canal) (*replication.BinlogStreamer, error) { |
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.
getSyncer here is not proper. This function seems to start the sync.
you can name to (c *Canal) startSyncer()
and then rename latter startSyncBinlog
to runSyncBinlog
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.
@siddontang I think that rename startSyncBinlog
to runSyncBinlog
will cause compatibility issues.
What about delete getSyncer
function and implement function logic in startSyncBinlog
?
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.
startSyncBinlog
is not exported, so it can't cause the compatibility issue.
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.
@siddontang fixed, plz review again
Thanks @NearTan |
Thanks @NearTan |
#144
masterInfo
writeBinglogDumpCommand
->writeBinlogDumpCommand