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

[fix]: ignore TableNotExistErr when handle onTableChanged; #311

Merged
merged 2 commits into from
Aug 20, 2018

Conversation

dominicqi
Copy link
Contributor

@@ -140,17 +140,17 @@ func (c *Canal) runSyncBinlog() error {

// the first last is table name, the second last is database name(if exists)
if len(mb[mbLen-2]) == 0 {
schema = e.Schema
db = e.Schema
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest keeping schema here to keep name consistent with others.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a package named 'schema'.

@siddontang
Copy link
Collaborator

siddontang commented Aug 20, 2018

can this fix #310?

@dominicqi
Copy link
Contributor Author

change to use errors.Cause(err) .

yes,i just test it.
1.drop table sync not exit;
2.then create table, Continue synchronizing table.

@siddontang siddontang merged commit 237167a into go-mysql-org:master Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants