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
DBZ-146 Improved error handling of MySQL Connector #130
Conversation
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.. couple spacing nits
@@ -387,6 +386,15 @@ protected void handleGtidEvent(Event event) { | |||
protected void handleQueryEvent(Event event) { | |||
QueryEventData command = unwrapData(event); | |||
logger.debug("Received update table command: {}", event); | |||
String sql = command.getSql().trim(); | |||
if ( sql.equalsIgnoreCase("BEGIN") ) { |
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.
Nit: space
@@ -296,6 +287,14 @@ protected void handleEvent(Event event) { | |||
|
|||
// And after that event has been processed, always set the starting row number to 0 ... | |||
startingRowNumber = 0; | |||
} catch (RuntimeException e) { | |||
// There was an error in the event handler, so propagate the failure to Kafka Connect ... | |||
failed(e,"Error processing binlog event"); |
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.
Nit: space
stop(); | ||
} catch (Throwable s) { | ||
// Log, but don't propagate ... | ||
logger.error("Failed to start the connector (see other exception), but got this error while cleaning up",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.
Nit: space
Improved the error handling of the MySQL connector to ensure that we’re always stopping the connector when we have a problem handling a binlog event or if we have problems starting.
Rebased and corrected the formatting issues. |
Improved the error handling of the MySQL connector to ensure that we’re always stopping the connector when we have a problem handling a binlog event or if we have problems starting.