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

DBZ-146 Improved error handling of MySQL Connector #130

Merged
merged 1 commit into from Nov 3, 2016

Conversation

rhauch
Copy link
Member

@rhauch rhauch commented Nov 1, 2016

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.

Copy link
Contributor

@criccomini criccomini left a 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") ) {
Copy link
Contributor

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");
Copy link
Contributor

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);
Copy link
Contributor

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.
@rhauch
Copy link
Member Author

rhauch commented Nov 3, 2016

Rebased and corrected the formatting issues.

@rhauch rhauch merged commit 9dd487c into debezium:0.3.x Nov 3, 2016
@rhauch rhauch deleted the dbz-146 branch November 3, 2016 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants