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

[Fix] [Connector-V2][Postgres-CDC] Fix NPE while reading snapshotSplit #8547

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,13 @@ private void createDataEvents(PostgresSnapshotContext snapshotContext, TableId t
throws Exception {
EventDispatcher.SnapshotReceiver snapshotReceiver =
dispatcher.getSnapshotChangeEventReceiver();
log.debug("Snapshotting table {}", tableId);
TableId newTableId = new TableId(null, tableId.schema(), tableId.table());
TableId newTableId = new TableId(tableId.catalog(), tableId.schema(), tableId.table());
log.info("Snapshotting table {}", newTableId);
databaseSchema.tableIds().stream()
.forEach(
tid -> {
log.info("table id: {} in databaseSchema", tid);
});
createDataEventsForTable(
snapshotContext, snapshotReceiver, databaseSchema.tableFor(newTableId));
snapshotReceiver.completeSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ public void testMultiTableWithRestore(TestContainer container)
log.info("****************** container logs start ******************");
String containerLogs = container.getServerLogs();
log.info(containerLogs);
// pg cdc logs contain ERROR
// Assertions.assertFalse(containerLogs.contains("ERROR"));
// pg cdc logs contain NullPointerException
Assertions.assertFalse(containerLogs.contains("NullPointerException"));
log.info("****************** container logs end ******************");
} finally {
// Clear related content to ensure that multiple operations are not affected
Expand Down
Loading