Commit Graph

7458 Commits

Author SHA1 Message Date
Randall Hauch
972cfbe2c4 DBZ-173 Additional fixes to KafkaDatabaseHistory class for Kafka 0.10.1.0
The KafkaDatabaseHistory class was not behaving well in tests using my local development environment. When restoring from the persisted Kafka topic, the class would set up a Kafka consumer and see repeated messages. It is unclear whether the repeats were due to our test environment and very short poll timeouts. Regardless, the restore logic was refactored to track offsets so as to only process messages once.
2017-02-01 14:47:41 -06:00
Randall Hauch
c380305e9b Merge pull request #167 from hchiorean/DBZ-173
DBZ-173 Upgrades the Kafka artifact versions to 0.10.1.1
2017-01-27 13:48:48 -06:00
Horia Chiorean
d035c4bc8d DBZ-173 Changes the MySQL ITs to not use TZ information for expected dates and fixes the character set for parsing test files 2017-01-27 14:53:10 +02:00
Horia Chiorean
a2154d3d32 DBZ-173 Changes the MySQL ITs to use the database.hostname system property instead of always hardcoding 'localhost' 2017-01-27 09:19:57 +02:00
Horia Chiorean
7dfdef3558 DBZ-173 Upgrades the Kafka artifact versions to 0.10.1.1 2017-01-27 09:19:57 +02:00
Randall Hauch
4514026c82 Merge pull request #170 from hchiorean/DBZ-183
DBZ-183 Fixes the BinlogReader's handling of TIMESTAMP columns to correctly account for timezones
2017-01-26 13:29:39 -05:00
Horia Chiorean
031c4a1552 DBZ-183 Fixes the BinlogReader's handling of TIMESTAMP columns to correctly account for timezones 2017-01-25 16:39:36 +02:00
Randall Hauch
4cd71394a8 Merge pull request #169 from rhauch/fix-mysql-it-results
Fixed MySQL integration test expected results
2017-01-23 11:10:00 -06:00
Randall Hauch
ab62831f3b Fixed MySQL integration test expected results
A recent change to MySQL added quoted identifiers from DDL statements (e.g., resulting from `SHOW CREATE TABLE <quotedIdentifier>`), so the expected results were changed to reflect this. Also, the `pos` field is quite brittle and changes with many MySQL version upgrades in the Docker images, so those fields are now ignored during the integration tests.
2017-01-23 10:57:47 -06:00
Randall Hauch
c27009b344 Merge pull request #164 from rhauch/dbz-179
DBZ-179 Changed PostgreSQL connector codebase to fix JavaDoc errors
2017-01-20 13:30:06 -06:00
Randall Hauch
706d030383 Merge pull request #168 from rhauch/fix-mysql-int-tests
Fixed MySQL integration tests to handle new log events from new MySQL versions
2017-01-20 12:51:35 -06:00
Randall Hauch
4c803c1fdf Fixed MySQL integration tests to handle new log events from new MySQL versions 2017-01-20 12:30:56 -06:00
Randall Hauch
f0db8d1b1f DBZ-179 Corrected JavaDoc in PostgreSQL connector
Corrected the JavaDoc and removed trailing spaces in the PostgreSQL connector code.
2017-01-20 11:51:17 -06:00
Randall Hauch
e11f242b00 DBZ-179 Moved generated source for Protobuf
The project requires that all JavaDoc for public methods exist and are valid (e.g., have all @param, @return and @throws to match the signature). However, the generated Java source for Protobuf contain numerous JavaDoc errors relative to these settings. This causes lots of errors inside Eclipse (and probably other IDEs), but ignoring/disabling the JavaDoc errors leads to improper JavaDoc (fixed in next commit). By moving the generated Protobuf source code to a separate directory (e.g., `generated-sources`), the IDEs will automatically discover the directory and the user can ignore any compiler and JavaDoc errors/warnings for those files while keeping the more strict JavaDoc checking enabled for the rest of the code.
2017-01-20 11:50:08 -06:00
Randall Hauch
93d34e3177 Merge pull request #166 from hchiorean/DBZ-177
DBZ-177 Changes the way the PostgreSQL connector loads the JDBC driver, to use the connector's classloader
2017-01-18 11:14:32 -06:00
Horia Chiorean
c024d0789b DBZ-177 Changes the way the PostgreSQL connector loads the JDBC driver, to use the connector's classloader 2017-01-18 17:59:20 +02:00
Randall Hauch
b0582370a6 Merge pull request #163 from rhauch/dbz-3
DBZ-3 Changed the PostgreSQL connector’s use of Docker containers
2017-01-16 08:35:07 -06:00
Randall Hauch
eeb4eafacf DBZ-3 Changed the PostgreSQL connector’s use of Docker containers
The PostgreSQL connetor was not able to build locally, since the Maven build would wait forever trying to talk to the TCP port for PostgreSQL before starting the integration tests. Even when I corrected the `wait` specification to use the localhost (rather than the direct container address), the build successfully connected to Postgres when it started the first time but before it shutdown to adjust the configuration, and thus the tests failed as the server was shutdown. The build now looks for a specific log message which is unique and output by the container after the second startup, and this seems to work great (at least locally).
2017-01-13 16:44:30 -06:00
Randall Hauch
a73f85a80f Merge pull request #162 from rareddy/DBZ-177
DBZ-177: Providing an alternative way to create JDBC connection based …
2017-01-13 13:37:38 -06:00
Ramesh Reddy
a9aace3480 DBZ-177: Providing an alternative way to create JDBC connection based on the configured JDBC driver class name and supplied classloader. The loading/creating the JDBC connections is not reliable when driver libraries in a different classloader than the DriverManager. 2017-01-13 12:58:14 -06:00
Randall Hauch
e8b06b0ec1 Merge pull request #144 from hchiorean/DBZ-3
DBZ-3 Implements a Debezium Connector for ingesting Postgresql changes via logical decoding
2017-01-11 13:32:09 -06:00
Randall Hauch
ec3503712c Merge pull request #161 from rareddy/DBZ-178
DBZ-178: Correcting error where error message is only logged in succe…
2017-01-11 11:23:44 -06:00
Ramesh Reddy
29a7043fe3 DBZ-178: Correcting error where error message is only logged in success scenarios in EmbeddedEngine 2017-01-11 09:39:47 -06:00
Horia Chiorean
c6b594e100 DBZ-3 Adds the assembly profile to the connector's POM 2017-01-04 11:41:52 +02:00
Horia Chiorean
ae85656851 DBZ-3 Fixes topic naming to include the name of the server 2016-12-30 09:42:48 +02:00
Horia Chiorean
d681c11eee DBZ-3 Adds README and NOTES documentation files for the postgres connector module 2016-12-27 14:44:34 +02:00
Horia Chiorean
6159524618 DBZ-3 Removes the sources for the Postgres JDBC driver and replaces them with a SNAPSHOT release which contains the streaming support 2016-12-27 14:44:33 +02:00
Horia Chiorean
a300d3e1cf DBZ-3 Changes the configuration of the Docker Maven plugin to only use alias naming when necessary and moves the PG connector ahead of the Mongo connector in the build 2016-12-27 14:44:33 +02:00
Horia Chiorean
737614a555 DBZ-3 Implements a connector for streaming changes from a Postgres database
The version of the DB server required for this to work is at least 9.4. To be able to stream logical changes, the code relies on enhancements to the JDBC driver which are not yet public. Therefore, the current codebase includes the sources for the JDBC driver.
The commit also updates the general DBZ build system for:
* custom checkstyle package exclusions - required by the Postgres driver the protobuf code for now
* adds support for debugging Surefire and Failsafe
2016-12-27 14:44:32 +02:00
Horia Chiorean
23e3f59fa1 DBZ-3 Implements a connector for streaming changes from a Postgres database
The version of the DB server required for this to work is at least 9.4
The commit also updates the general DBZ build system for:
* custom checkstyle package exclusions - required by the Postgres driver the protobuf code for now
* adds support for debugging Surefire and Failsafe
2016-12-27 14:44:32 +02:00
Horia Chiorean
f13208a229 DBZ-3 Adds a local copy of the PG driver which contains the logical replication support 2016-12-27 14:44:31 +02:00
Horia Chiorean
8e14f150db DBZ-3 Adds the structure for a Postgres connector which uses a Debezium Postgres docker image that has the decoderbufs plugin enabled to read WAL changes 2016-12-27 14:44:29 +02:00
Randall Hauch
49e6231b69 DBZ-151 Removed integration module from normal build 2016-12-21 17:11:15 -06:00
Randall Hauch
928db59807 DBZ-170 Changed the MongoDB connector’s connection logic 2016-12-21 17:06:58 -06:00
Randall Hauch
a960d25ea7 Updated changelog for the 0.3.6 release. 2016-12-21 15:54:51 -06:00
Randall Hauch
d808f7e6a0 Merge pull request #159 from rhauch/dbz-170
DBZ-170 Changed the MongoDB connector’s connection logic
2016-12-21 15:19:00 -06:00
Randall Hauch
443edc358d DBZ-170 Changed the MongoDB connector’s connection logic
This change alters the way the MongoDB connects to the various servers in a cluster. Previously, the ConnectionContext constructor currently set up the MongoDB client with credentials for the `admin` and `config` databases, and apparently the client eagerly performs authentication against all databases passed in, rather than doing this lazily as DBs are use.

Instead, the code no longer sets up the credentials for the `config` database and instead only sets up credentials for the `admin` database for authentication and authorization. This works as long as the user specified in the connector configuration can read the `config` database.

Several other changes were made to improve the error handling and reporting when the replica set information cannot be read from the `config` database.
2016-12-21 14:27:42 -06:00
Randall Hauch
971df374a8 Merge pull request #158 from rhauch/dbz-164
DBZ-164 Improved MySQL snapshot reader logic
2016-12-21 08:49:08 -06:00
Randall Hauch
e60839e76b DBZ-164 Improved MySQL snapshot reader logic
Added more logic to the snapshot reader to better handle errors when reading the list of table names in each database. Now, any errors with a single database (e.g., some of the not-quite-a-database names described in the JIRA issue) will cause the snapshot reader to simply skip that database name and continue on (with proper logging).

This change also quotes all of the database and table names when used in SQL statements.
2016-12-20 22:03:46 -06:00
Randall Hauch
fd7e152852 Merge pull request #142 from rhauch/dbz-151
DBZ-151 Added new integration test framework
2016-12-20 17:53:16 -06:00
Randall Hauch
ab1140ef70 Merge pull request #155 from rhauch/dbz-169
DBZ-169 MySQL connector support for ON UPDATE clauses
2016-12-20 17:48:06 -06:00
Randall Hauch
fe44380d4c Merge pull request #154 from rhauch/dbz-168
DBZ-168 MySQL connector ignores XA binlog events
2016-12-20 17:47:57 -06:00
Randall Hauch
07a7858792 Merge pull request #156 from rhauch/dbz-167
DBZ-167 Corrected the MongoUtil class
2016-12-20 17:47:45 -06:00
Randall Hauch
b578afc9aa Merge pull request #157 from rhauch/dbz-152
DBZ-152 Enabled MySQL connector to skip table count checks during snapshot
2016-12-20 17:47:33 -06:00
Randall Hauch
a9a84cb6aa DBZ-152 Enabled MySQL connector to skip table count checks during snapshot
Change the MySQL connector’s `min.row.count.to.stream.results` configuration property to accept a value of 0, which signifies that all `SELECT COUNT(*) FROM tableA` queries should be skipped and instead all results should be streamed.
2016-12-20 17:40:57 -06:00
Randall Hauch
c1a26ee261 DBZ-167 Corrected the MongoUtil class
Corrected the `onCollection` utility method in the `MongoUtil` class to pass in the collection name rather than the database name.
2016-12-20 16:24:07 -06:00
Randall Hauch
046702d959 DBZ-169 MySQL connector support for ON UPDATE clauses
Corrected the MySQL DDL parser to support `ON UPDATE NOW()` clauses in addition to `ON UPDATE CURRENT_TIMESTAMP`.
2016-12-20 16:19:18 -06:00
Randall Hauch
09f87cf190 DBZ-168 MySQL connector ignores XA binlog events
MySQL 5.7.7 introduced new behavior for handling XA events in the binlog. See the [MySQL documentation|http://dev.mysql.com/doc/refman/5.7/en/xa-restrictions.html] for details. This PR changes the binlog reader so that `XA …` statements appearing in the binlog are ignored altogether.
2016-12-20 15:32:44 -06:00
Randall Hauch
5dceb05f69 DBZ-151 Additional changes to improve test framework and MySQL integration tests 2016-12-20 10:58:56 -06:00
Randall Hauch
08e32a4a8b DBZ-151 Added multiple integration test modules to test various MySQL versions and configurations.
These new modules run during the '-Passembly' profile and use the new integration test framework that compares all
output produced by a connector to expected results that were previously recorded and verified. These integration test modules
can be run manually with a simple build of those modules or their parent; only the top-level 'integration-tests' module is run
during the assembly profile during builds of the entire codebase.
2016-12-20 09:18:10 -06:00