Commit Graph

7593 Commits

Author SHA1 Message Date
Sherafudheen PM
ee52219736 DBZ-160 - Issue while parsing create table script with ENUM type and default value 'b' 2016-12-02 17:42:44 +05:30
Randall Hauch
09545e0ec9 Merge pull request #143 from rhauch/dbz-157
DBZ-157 Upgraded Docker Maven plugin
2016-11-22 09:38:10 -06:00
Randall Hauch
0bf3b4c9f3 DBZ-157 Upgraded Docker Maven plugin
Upgraded the Docker Maven plugin to 0.18.1, which required changing our use of the `docker.image` to `docker.filter` (per the [changes in 0.17.1](https://github.com/fabric8io/docker-maven-plugin/blob/master/doc/changelog.md)).
2016-11-22 09:23:07 -06:00
Randall Hauch
e5e56d0252 Merge pull request #141 from hchiorean/DBZ-156
DBZ-156 Adds better error handling to the EmbeddedEngine
2016-11-18 08:14:56 -06:00
Horia Chiorean
968cf62b23 DBZ-156 Adds better error handling to the EmbeddedEngine 2016-11-18 11:04:00 +02:00
Randall Hauch
0dc86dbdae Merge pull request #140 from hchiorean/DBZ-156
DBZ-156 Updates EmbeddedEngine to better handle exceptional cases and provide more feedback during startup
2016-11-17 19:15:07 -06:00
Horia Chiorean
506457c13b DBZ-156 Updates EmbeddedEngine to better handle exceptional cases and provide more feedback during startup
It also updates  EmbeddedEngine to use the Kafka commit callbacks introduced after 0.10 and updates AbstractConnectorTest to better synchronize with the embedded engine
2016-11-17 19:18:07 +02:00
Randall Hauch
a82ae5691b Reduce the log verbosity of the MySQL tests 2016-11-14 13:41:10 -06:00
Randall Hauch
bfbf485123 Upgrade MySQL JDBC driver 2016-11-14 13:41:01 -06:00
Randall Hauch
86476faffa Updated release notes for the 0.3.5 release. 2016-11-14 12:41:42 -06:00
Randall Hauch
d80bc1bfd7 DBZ-153 MySQL connector supports enum and set values with parentheses
Changed the MySQL connector to support ENUM and SET literals with parentheses.
2016-11-14 12:22:08 -06:00
Randall Hauch
8a52cda0dc DBZ-150 Changed the order of events when a row's key is changed. 2016-11-09 14:42:43 -06:00
Randall Hauch
b0ded5f383 DBZ-147 Added ability to treat MySQL DECIMAL as double
By default the MySQL connector handles `DECIMAL` and `NUMERIC` columns using `java.math.BigDecimal` values and describing them using the `org.apache.kafka.connect.data.Decimal` schema type, which serializes the values to a binary form.

This change adds a configuration option that will keep the default behavior, but will instead allow handling `DECIMAL` adn `NUMERIC` values as Java `double` and a schema type of `FLOAT64`.
2016-11-09 11:27:09 -06:00
Randall Hauch
ea5f7983c7 DBZ-144 Corrected MySQL connector restart
Added tests to verify whether the connector is properly restarting in the binlog when previously the connector failed or stopped in the middle of a transaction. The tests showed that the connector is not able to properly start when using or not using GTIDs, since restarting from an arbitrary binlog event causes problems since the TABLE_MAP events for the affected tables are skipped.

The logic was changed significantly to record in the offsets the binlog coordinates at the start of the transaction, which should work whether or not GTIDs are used. Upon restart, the connector may have to re-read the events that were previously processed, but now the offset also includes the number of events that were previously processed so that these can be skipped upon restart.

This has an unforunate side effect since the offsets capture a transaction was completed only when it generates a source record for the subsequent transaction. This is because the connector generates source records (with their offsets) for the binlog events in the transaction before the transaction's commit is seen. And, since no additional source records are produced for the transaction commit, the recorded offsets will show that the prior transaction is complete and that all of the events in the subsequent transaction are to be skipped. Thus, upon restart the connector has to re-read (but ignore) all of the binlog events associated with the completed transaction. This shouldn’t be a problem, and will only slow restarts for very large transactions.
2016-11-09 08:11:41 -06:00
Randall Hauch
0d2acfd0a6 DBZ-149 Corrected type of BINARY column
The MySQL connector (or rather the DDL parser used in the connector) improperly assumed a `CHAR` JDBC type (and Avro schema `STRING` type) for MySQL columns of type `BINARY`. This corrects the error.
2016-11-08 17:41:01 -06:00
Randall Hauch
c66037f52a Merge pull request #133 from rhauch/dbz-148
DBZ-148 Corrected timestamp check in test case to account for DST
2016-11-08 16:00:01 -06:00
Randall Hauch
7656dce985 DBZ-148 Corrected timestamp check in test case to account for DST 2016-11-08 15:37:03 -06:00
Randall Hauch
43d2bf14cf DBZ-143 Minor improvements and correction of JavaDoc. 2016-11-04 09:02:44 -05:00
Randall Hauch
207315e5df DBZ-146 Improved error handling of MySQL Connector
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.
2016-11-03 16:55:59 -05:00
Chris Riccomini
c195fc1f4c DBZ-143 Support multi-channel MySQL failover
Make Debezium merge its GTID set with the GTID set on the server that
it's connecting to. This allows Debezium to consume from a MySQL server
that might have a different set of channels (upstream masters), provided
that the server has the data that Debezium needs.
2016-11-03 16:47:42 -05:00
Randall Hauch
13c3b0c756 Updated changelog for 0.3.4 2016-10-25 12:04:41 -05:00
Randall Hauch
8fbd2ea6da Merge pull request #126 from rhauch/dbz-133a
DBZ-133 Support 'schema' snapshot mode for MySQL connector
2016-10-25 11:33:28 -05:00
Randall Hauch
f970899a6d DBZ-133 Minor changes to JavaDoc 2016-10-25 11:12:55 -05:00
Prannoy Mittal
fa66abdcc3 DBZ-133 is for enabling schema only snapshot mode.
Snapshot Reader will have a dataInclude flag, which will determine whether initial data in whitelisted database and tables have to
    read or not. In schema only mode, will not read inital data, will capture only database table schema
    Added unit test for validating checks that initial data is not copied
2016-10-25 11:04:26 -05:00
Randall Hauch
094f9a4925 DBZ-139 Corrected binlog timestamp handling
MySQL records the timestamp with second precision in binlog events, but the library we use multiplies by 1000 to return the padded value in milliseconds (even though the value still has second precision). The BinlogReader converts this back to seconds, so the SourceInfo should not also be dividing by 1000.
2016-10-20 09:31:02 -05:00
Randall Hauch
2000765341 Merge pull request #121 from rhauch/dbz-134
DBZ-134 Enabled JMX metrics for MySQL connector
2016-10-19 16:58:24 -05:00
Randall Hauch
25b8055642 DBZ-134 Enabled JMX metrics for MySQL connector
Added an MXBean for the MySQL connector that captures various metrics while reading the binlog.
2016-10-19 16:48:11 -05:00
Randall Hauch
028d6442e2 Merge pull request #119 from rhauch/dbz-126
DBZ-126 Added support for MySQL JSON type
2016-10-19 08:49:54 -05:00
Randall Hauch
4a62b09ead DBZ-126 Added support for MySQL JSON type
Adds support for MySQL 5.7's `JSON` type, which is capable of holding JSON objects, JSON arrays, and scalar values. The Debezium MySQL connector represents `JSON` values as string with a `io.debezium.data.Json` semantic type (which is basically a string schema that has a special name to denote the semantics), and the _contents_ of that string will be the JSON representation of the object, array, or scalar value.
2016-10-18 17:32:55 -05:00
Randall Hauch
0012125635 Upgraded the Maven Docker plugin 2016-10-18 17:10:06 -05:00
Randall Hauch
fc4319b134 Updated changelog for 0.3.3 2016-10-18 14:43:15 -05:00
Randall Hauch
2f5772712a DBZ-129 Fix for GTID updates
Workaround for https://github.com/shyiko/mysql-binlog-connector-java/issues/122.
2016-10-18 14:32:06 -05:00
Randall Hauch
7387654bfa DBZ-129 Additional improvements for MySQL connector GTID-based startup
Added more integration tests to verify the behavior of the MySQL connector when it is (re)starting using GTIDs.
2016-10-18 14:30:10 -05:00
Randall Hauch
305c4c5ac6 DBZ-129 MySQL connector can now use subset of GTID set when reconnecting to MySQL
When a connector is originally connected to a MySQL server, it will record the GTID set that identifies the position in the binlog. When all of the interesting transactions originate on a different server (i.e., the server we're listening to is a replica), the server we're listening to will still include some transactions in the binlog (e.g., for the information schema, performance, or other internal databases), and so the GTID set will include a GTID range for our server. If we stop the connector and want to point it to a different MySQL server, asking MySQL to position the binlog using the complete GTID set (including the GTID range for our old replica) will cause an error, since the new server does not have any GTID ranges from the old replica. Therefore, the connector needs to be able to exclude some GTID ranges that originated on the original replica, using the `server_uuid` property of the replica server.

This change adds two configuration properties: `gtid.source.includes` and `gtid.source.excludes`. Both are optional, but at most only one of these can be used. These properties contain a comma-separated list of GTID sources (i.e., the `server_uuid` value for the server where the transaction originated) or regular expressions matching GTID sources, and upon connector startup the connector uses the list to filter the previously-recorded GTID set against the available GTID set in the current MySQL server. By including specific GTID sources, an administrator can control the subset of GTID ranges that govern the binlog position.

These properties will not be useful in some topologies, especially when the MySQL server from which the binlog is being read is the originating server for some of the transactions. However, these properties may be very useful in any topology where the connector is _only_ reading from replicas, so that the connector can be switched to another replica at any time. In some cases it may be easier to exclude all of the replicas' `server_uuid` values, while in other cases it may be easier to include all of the `server_uuid` values where transactions can originate.
2016-10-18 14:29:58 -05:00
Horia Chiorean
1a99f5bbc7 DBZ-135 Fixes the parsing of line separators by GtidSet (#118) 2016-10-13 10:18:33 -05:00
Randall Hauch
d955ed2e4b DBZ-132 Cleanup of code (#117)
Additional cleanup of changes made for DBZ-132.
2016-10-11 15:36:07 -05:00
Randall Hauch
0984ed3b00 Merge pull request #116 from pranmitt/DBZ-132
DBZ-132 Capturing only first char of String in Enum for each row entr…
2016-10-11 15:24:26 -05:00
Prannoy Mittal
301d60411f Using debezium String Library to get join to list of strings 2016-10-12 00:53:36 +05:30
Prannoy Mittal
a36700e51b Enum and Set were assumed to single character.
Updated MysqlParser to return list of String for allowed enum and set values
And also added code fix to get a enum value at a particular index and for set option too.
Used debezium string utility to join list of string into deliminator seperated String.
Updating old test cases as per required to handle list of strings.
2016-10-12 00:41:08 +05:30
Randall Hauch
ee3277d6c5 Merge pull request #115 from williecheong/patch-1
DBZ-115 Add support to recognize older row_event formats
2016-10-08 14:16:51 -05:00
Willie
fda76c875e DBZ-115 Add support to recognize older row_event formats 2016-10-08 11:42:12 -07:00
Randall Hauch
99a86ad289 Merge pull request #112 from rhauch/dbz-123
DBZ-123 Corrected the MySQL DDL parser to properly handle bit-set literals
2016-10-07 17:16:37 -05:00
Randall Hauch
332de18384 Corrected headers 2016-10-07 17:16:27 -05:00
Randall Hauch
beb47dd2de DBZ-131 Improved logging while reading binlog
When the MySQL connector is reading the binlog, it outputs INFO log messages reporting status at an exponentially-increasing rate, starting at every 5 seconds and doubling until a max period of 1 hour. This output is useful when the connector starts to know that it is working, but thereafter the usefulness decreases. Once an hour is probably acceptable output.

This is not intended to replace the capturing of metrics, but is merely an aid to easily tell via the logs whether the connector continues to work.

Also improved the log message when the binlog reader stops to capture the total number of events recorded by Kafka Connect and the last recorded offset.
2016-10-07 17:10:01 -05:00
Randall Hauch
9d2b0721cb Update CONTRIBUTE.md 2016-10-07 09:52:11 -05:00
Randall Hauch
50eb4094ac DBZ-123 Corrected the MySQL DDL parser to properly handle bit-set literals
The DDL parser now properly handles bit-set literals, and several minor case-sensitivity bugs dealing with other escaped literals.
2016-10-06 13:25:38 -05:00
Randall Hauch
16a3cd0994 Updated changelog for 0.3.2 2016-09-26 10:25:45 -05:00
Randall Hauch
3fd8287a3e Merge pull request #110 from rhauch/dbz-104
DBZ-104 Added test to verify behavior of CREATE TABLE LIKE expression
2016-09-26 09:59:59 -05:00
Randall Hauch
64bab3b3cf DBZ-104 Added test to verify behavior of CREATE TABLE LIKE expressions with and without snapshot 2016-09-23 12:11:38 -05:00
Randall Hauch
5c233dfca7 Merge pull request #109 from rhauch/dbz-128
DBZ-128 Additional fix to MySQL compatibility message.
2016-09-23 11:22:52 -05:00