Commit Graph

1684 Commits

Author SHA1 Message Date
Addison Higham
8e21139ca3 DBZ-1082 Add new custom recovery mode, more metadata
This commit does a few things:

- Refactors snapshot modes to be encapsulated by an interface and
to only use that interface in determining when to snapshot and in
determing the type of the `RecordProducer` interface to instantiate
- Refactors the configuration of existing snapshot modes to tie the
existing snapshot modes to their aligned implementation
- Adds a new snapshot.mode, custom, and a new configuration option to
specify a custom implementation that will be loaded by the class loader
- Changes the visibility of some classes to allow for custom snapshot
modes to get enough context to make an informed choice
- Adds some metadata about slots (the catalog_xmin) to give a full idea
of the state of slots which can be useful in implementing snapshot
modes (which is also configurable, as it can add some overhead)

Together, these changes allow for a much broader flexibility got end
users to implement a snapshot mode that can do more advanced snapshots,
such as partial recovery or for partial snapshots for tables where not
all records are needed.

This could also be seen as superseeding the
`snapshot.select.statement.overrides` to allow for users to dynamically
build queries based on the state of the slot and the offsets consumed.
2019-03-24 11:56:40 +01:00
Jiri Pechanec
b11f1b8d05 DBZ-1161 Start snapshot in async thread 2019-03-21 14:32:47 +01:00
Jiri Pechanec
13f49f02a9 DBZ-1185 Use Boolean instead of Optional 2019-03-21 14:02:23 +01:00
Jiri Pechanec
958d207121 DBZ-1185 Skip unsupported tests for legacy parser 2019-03-21 14:02:23 +01:00
Jiri Pechanec
601f2008ac DBZ-1185 SERIAL is valid table/column id 2019-03-21 14:02:23 +01:00
Jiri Pechanec
76e7cd6664 DBZ-1185 Support for SERIAL default value 2019-03-21 14:02:23 +01:00
Jiri Pechanec
4d4741a207 DBZ-1185 Support for SERIAL type alias 2019-03-21 14:02:23 +01:00
Gunnar Morling
7180768ce5
DBZ-1181 - Process WAL2JSON Events with Empty Changes (#808)
DBZ-1181 Adding support for processing WAL2JSON events that have no changes;

This allows to produce heartbeats when _only_ receiving such events for a longer period of time, e.g. updates of materialized views.
2019-03-21 12:32:47 +01:00
Gunnar Morling
c8fa161892 DBZ-1179 Adding Jon Casstevens to COPYRIGHT.txt 2019-03-21 12:07:44 +01:00
Jon Casstevens
2efdae1ffd DBZ-1179 Set the default replication factor property for history topics when none is provided 2019-03-21 12:07:10 +01:00
Jiri Pechanec
915bdc9b7f DBZ-1186 Comma is not mandatory between table options 2019-03-21 11:22:07 +01:00
Jiri Pechanec
f3c0c94b40 DBZ-1188 Use string testing utility method 2019-03-21 10:38:32 +01:00
Jiri Pechanec
2df2a62ddf DBZ-1188 False pasitive warning for non-empty password 2019-03-21 10:32:06 +01:00
trolison
2001b178d7 - Fixed bad formatting
- Added trace for when empty messages are processed
DBZ-1181
2019-03-19 10:46:36 -07:00
trolison
df0e789601 - Add support for processing WAL2JSON events that have no changes
DBZ-1181
2019-03-18 20:32:03 -07:00
Jiri Pechanec
c740400587 DBZ-1184 Run the test as the last in testsuite 2019-03-18 12:12:12 +01:00
Jiri Pechanec
08bc66f8ef DBZ-1184 Simplify the test 2019-03-18 12:12:12 +01:00
Jiri Pechanec
a892a4eb6f DBZ-1184 Add test 2019-03-18 12:12:12 +01:00
Jiri Pechanec
41734d322e DBZ-1184 Support long purged GTID set 2019-03-18 12:12:12 +01:00
Renato Mefi
2f187fd1cb DBZ-354 Improve MongoDB hosts validation
The previous statement was never achievable since `ReplicaSets.parse(hosts)` can never return null
Also removed some code duplication for better readability
2019-03-14 16:53:51 +01:00
Gunnar Morling
ee9207ef26 DBZ-1174 Adding Ashhar Hasan to copyright.txt 2019-03-12 17:19:13 +01:00
Gunnar Morling
2ea87727cf DBZ-1174 Using Instant instead of long for representing timestamps 2019-03-12 17:19:13 +01:00
Ashhar Hasan
0b07afd23e DBZ-1174 Convert commitTime from nanos to micros for wal2json
- wal2json sends the txn commitTime using a function from PostgreSQL's C
  library. The value that Debezium recevies is in nanoseconds.
- decoderbufs sends the txn commitTime in microseconds.
- RecordsSnapshotProducer updates SourceInfo.ts_usec by converting
  System.currentTimeMillis() to microseconds.
- RecordsSnapshotProducer updates the SourceInfo's ts_usec field using
  message.getCommitTime().

This means that when using wal2json, the value of SourceInfo.ts_usec
is in microseconds since epoch during snapshot but is in nanoseconds
during streaming. To fix this, we changed
Wal2JsonReplicationMessage.getCommitTime() to return in microseconds.
2019-03-12 17:19:13 +01:00
Jiri Pechanec
71765a2ab2 DBZ-1170 Detect and handle errors like ULE 2019-03-11 10:29:54 +01:00
Josh Stanfield
e4b7b90637 DBZ-1162 fix to ensure hstore snapshots behave the same as streams 2019-03-04 13:39:50 +01:00
Jenkins user
50a7c568fa [maven-release-plugin] prepare for next development iteration 2019-02-23 09:53:58 +00:00
Jenkins user
28f3839804 [maven-release-plugin] prepare release v0.9.2.Final 2019-02-23 09:53:58 +00:00
Jiri Pechanec
a52ea90b0f [release] Changelog for 0.9.2.Final 2019-02-22 14:16:23 +01:00
Jiri Pechanec
78bfda09a6 DBZ-1146 Test full column diff 2019-02-22 14:16:03 +01:00
Gunnar Morling
5043d41b7b DBZ-1146 Expanding test 2019-02-22 14:16:03 +01:00
Jiri Pechanec
4dec844fa2 DBZ-1146 Fix table created in streaming test 2019-02-22 14:16:03 +01:00
Jiri Pechanec
fa1e632a90 DBZ-1146 Handle toastable columns for snapshotted tables 2019-02-22 14:16:03 +01:00
Gunnar Morling
18a31810f8 DBZ-867 Adding Krizhan Mariampillai to COPYRIGHT.txt 2019-02-21 17:00:12 +01:00
Gunnar Morling
d2b26d03a7 DBZ-867 Misc clean-up;
* Exposing new config via MongoDbConnectorConfig
* Removing superfluous connector restart in the test
2019-02-21 17:00:12 +01:00
krizhan
652f3b1c59 DBZ-867 Added integration test and updated enum names 2019-02-21 17:00:12 +01:00
krizhan
441228a989 DBZ-867 Add snapshot mode NONE for MongoDB connector 2019-02-21 17:00:12 +01:00
Jiri Pechanec
89feae32e7 DBZ-1141 Test for the default values 2019-02-21 15:02:51 +01:00
Gunnar Morling
0106a8ecec DBZ-1149 Adding Keith Barber to COPYRIGHT.txt 2019-02-21 15:02:51 +01:00
Gunnar Morling
6787d17d54 DBZ-1141 Misc. clean-up;
* Removing redundant check for date mapping type
* Always using String as fallback value for temporal values where needed
* Pulling fallback temporal values up to JdbcValueConverters
2019-02-21 15:02:51 +01:00
Jiri Pechanec
b9d326711d DBZ-1141 Incorrect money scale 2019-02-21 15:02:51 +01:00
Jiri Pechanec
992c31fa1f DBZ-1141 Add non-date types 2019-02-21 15:02:51 +01:00
Jiri Pechanec
41ba7128e3 DBZ-1141 Correct default falback values for connect date types 2019-02-21 15:02:51 +01:00
Keith Barber
95b2290df2 DBZ-1149 Ensure consistent Java types for fallback values when converting 2019-02-21 15:02:51 +01:00
Gunnar Morling
4698cde5bb DBZ-1130 Adding Taylor Rolison to COPYRIGHT.txt 2019-02-21 14:08:08 +01:00
taylor-rolison
17c6a7a82d Config option to pass optional logical decoder stream params (#783)
DBZ-1130 Added config param slot.stream.params to the Postgres connector to allow passing optional params to logical decoder on stream start
2019-02-21 14:06:51 +01:00
Jiri Pechanec
c7e0ff231b DBZ-1156 DBZ-1157 Upgrade to Kafka 2.1.1, Confluent Plat. 5.1.2 2019-02-21 09:39:05 +01:00
Jiri Pechanec
ff5aaf2e9a DBZ-1153 Support for special char names 2019-02-20 15:25:45 +01:00
Gunnar Morling
510e9415f9 DBZ-1137 Some clean-up;
* Using existing justifyLeft() method
* Giving expected values as Duration
* Removing unused methods
2019-02-19 18:41:09 +01:00
Jiri Pechanec
0d60e60243 DBZ-1137 Default for TIME can be generic interval value 2019-02-19 13:40:01 +01:00
Jiri Pechanec
46aad6bcf5 DBZ-1147 Single quotes for string constant 2019-02-18 14:41:03 +01:00