Skip to content

Commit

Permalink
resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhav-yb committed Sep 23, 2024
2 parents b55f1cd + 0b7b00a commit c021d3f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 59 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -692,13 +692,18 @@ January 18th 2024 [Detailed release notes](https://issues.redhat.com/secure/Rele

### Fixes since 2.5.0.Final

<<<<<<< HEAD
* Connector is getting stopped while processing bulk update(50k) records in debezium server 2.0.1.Final [DBZ-6955](https://issues.redhat.com/browse/DBZ-6955)
* Empty object sent to GCP Pub/Sub after DELETE event [DBZ-7098](https://issues.redhat.com/browse/DBZ-7098)
* Enhance Oracle's CREATE TABLE for Multiple Table Specifications [DBZ-7286](https://issues.redhat.com/browse/DBZ-7286)
>>>>>>> 2.7.2.Final
* PostgreSQL ad-hoc blocking snapshots fail when snapshot mode is "never" [DBZ-7311](https://issues.redhat.com/browse/DBZ-7311)
* Ad-hoc blocking snapshot dies with "invalid snapshot identifier" immediately after connector creation [DBZ-7312](https://issues.redhat.com/browse/DBZ-7312)
* Empty object sent to GCP Pub/Sub after DELETE event [DBZ-7098](https://issues.redhat.com/browse/DBZ-7098)
* Debezium-ddl-parser crashes on parsing MySQL DDL statement (subquery with UNION) [DBZ-7259](https://issues.redhat.com/browse/DBZ-7259)
* Oracle DDL parsing error in PARTITION REFERENCE [DBZ-7266](https://issues.redhat.com/browse/DBZ-7266)
* Enhance Oracle's CREATE TABLE for Multiple Table Specifications [DBZ-7286](https://issues.redhat.com/browse/DBZ-7286)
* PostgreSQL ad-hoc blocking snapshots fail when snapshot mode is "never" [DBZ-7311](https://issues.redhat.com/browse/DBZ-7311)
* Ad-hoc blocking snapshot dies with "invalid snapshot identifier" immediately after connector creation [DBZ-7312](https://issues.redhat.com/browse/DBZ-7312)
* Specifying a table include list with spaces between elements cause LogMiner queries to miss matches [DBZ-7315](https://issues.redhat.com/browse/DBZ-7315)
* Debezium heartbeat.action.query does not start before writing to WAL: part 2 [DBZ-7316](https://issues.redhat.com/browse/DBZ-7316)
* errors.max.retries is not used to stop retrying [DBZ-7342](https://issues.redhat.com/browse/DBZ-7342)
* Oracle connector is ocasionally unable to find SCN [DBZ-7345](https://issues.redhat.com/browse/DBZ-7345)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ protected void validateConnection(Map<String, ConfigValue> configValues, Configu
// Prepare connection without initial statement execution
connection.connection(false);
testConnection(connection);

checkReadOnlyMode(connection, postgresConfig);
checkLoginReplicationRoles(connection);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
io.debezium.connector.postgresql.YugabyteDBConnector
io.debezium.connector.postgresql.YugabyteDBConnector
Original file line number Diff line number Diff line change
Expand Up @@ -1795,60 +1795,6 @@ public void shouldRegularlyFlushLsnWithTxMonitoring() throws InterruptedExceptio
assertThat(flushLsn.size()).isGreaterThanOrEqualTo((recordCount * 3) / 4);
}

@Test
@FixFor("DBZ-1082")
public void shouldAllowForCustomSnapshot() throws InterruptedException {
TestHelper.execute(SETUP_TABLES_STMT);
Configuration config = TestHelper.defaultConfig()
.with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.CUSTOM.getValue())
.with(PostgresConnectorConfig.SNAPSHOT_MODE_CUSTOM_NAME, CustomTestSnapshot.class.getName())
.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE)
.build();
start(YugabyteDBConnector.class, config);
assertConnectorIsRunning();

SourceRecords actualRecords = consumeRecordsByTopic(1);

List<SourceRecord> s1recs = actualRecords.recordsForTopic(topicName("s1.a"));
List<SourceRecord> s2recs = actualRecords.recordsForTopic(topicName("s2.a"));
assertThat(s1recs.size()).isEqualTo(1);
assertThat(s2recs).isNull();

SourceRecord record = s1recs.get(0);
YBVerifyRecord.isValidRead(record, PK_FIELD, 1);

TestHelper.execute(INSERT_STMT);
actualRecords = consumeRecordsByTopic(2);

s1recs = actualRecords.recordsForTopic(topicName("s1.a"));
s2recs = actualRecords.recordsForTopic(topicName("s2.a"));
assertThat(s1recs.size()).isEqualTo(1);
assertThat(s2recs.size()).isEqualTo(1);
record = s1recs.get(0);
YBVerifyRecord.isValidInsert(record, PK_FIELD, 2);
record = s2recs.get(0);
YBVerifyRecord.isValidInsert(record, PK_FIELD, 2);
stopConnector();

config = TestHelper.defaultConfig()
.with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.CUSTOM.getValue())
.with(PostgresConnectorConfig.SNAPSHOT_MODE_CUSTOM_NAME, CustomTestSnapshot.class.getName())
.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE)
.build();
start(YugabyteDBConnector.class, config);
assertConnectorIsRunning();
actualRecords = consumeRecordsByTopic(4);

s1recs = actualRecords.recordsForTopic(topicName("s1.a"));
s2recs = actualRecords.recordsForTopic(topicName("s2.a"));
assertThat(s1recs.size()).isEqualTo(2);
assertThat(s2recs.size()).isEqualTo(2);
YBVerifyRecord.isValidRead(s1recs.get(0), PK_FIELD, 1);
YBVerifyRecord.isValidRead(s1recs.get(1), PK_FIELD, 2);
YBVerifyRecord.isValidRead(s2recs.get(0), PK_FIELD, 1);
YBVerifyRecord.isValidRead(s2recs.get(1), PK_FIELD, 2);
}

@Ignore("Snapshot mode ALWAYS is unsupported")
@Test
@FixFor("DBZ-2456")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void shouldProcessFromSnapshotOld() throws Exception {
@Test
public void shouldProcessFromStreaming() throws Exception {
start(YugabyteDBConnector.class, TestHelper.defaultConfig()
.with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER)
.with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NO_DATA)
.with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk")
.build());
assertConnectorIsRunning();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public static String getIdForConnectorClass(String className) {
case "io.debezium.connector.oracle.OracleConnector":
return "oracle";
case "io.debezium.connector.postgresql.PostgresConnector":
case "io.debezium.connector.postgresql.YugabyteDBConnector":
return "postgres";
case "io.debezium.connector.sqlserver.SqlServerConnector":
return "sqlserver";
Expand All @@ -70,6 +71,8 @@ public static String getDisplayNameForConnectorClass(String className) {
return "Debezium Oracle Connector";
case "io.debezium.connector.postgresql.PostgresConnector":
return "Debezium PostgreSQL Connector";
case "io.debezium.connector.postgresql.YugabyteDBConnector":
return "Debezium YugabyteDB Connector";
case "io.debezium.connector.sqlserver.SqlServerConnector":
return "Debezium SQLServer Connector";
case "io.debezium.connector.mariadb.MariaDbConnector":
Expand Down

0 comments on commit c021d3f

Please sign in to comment.