-
Notifications
You must be signed in to change notification settings - Fork 987
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
replication,cmd: improve flavor handling #946
Conversation
If there is an good way to make it auto detect the flavor this would be even better |
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
serverVersion := b.c.GetServerVersion() | ||
if b.cfg.Flavor != MariaDBFlavor && | ||
strings.Contains(b.c.GetServerVersion(), "MariaDB") { | ||
b.cfg.Logger.Errorf("misconfigured flavor (%s) for server %s", |
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.
And I think we can add comment to explain why this is only a log not a failure to caller, like "MariaDB still sends binlog events in a compatible way although some functionalities are lost, so we just log the 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.
I've added a code comment. Or did you want to put this in the message instead?
641d0b6
to
9d2038e
Compare
For `go-mysqlbinlog` and `go-canal`: return an error for invalid flavors. For `go-mysqlbinlog`: log a non-critical error if the server version has "MariaDB" in it but the flavor isn't set to "mariadb".
9d2038e
to
d02805d
Compare
Issue: close #944
For
go-mysqlbinlog
andgo-canal
: return an error for invalid flavors.For
go-mysqlbinlog
: log a non-critical error if the server version has "MariaDB" in it but the flavor isn't set to "mariadb".