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

No error on null key [HZ-2086] #23768

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

TomaszGaweda
Copy link
Contributor

Debezium relaxed the requirement for keys - it can be null now. In such cases, do not throw an exception.

Fixes #23655

Breaking changes (list specific methods/types/messages):

  • ChangeRecord#key() is now @Nullable, was @Nonnull

Checklist:

  • Labels (Team:, Type:, Source:, Module:) and Milestone set
  • Label Add to Release Notes or Not Release Notes content set
  • Request reviewers if possible
  • Send backports/forwardports if fix needs to be applied to past/future releases

@TomaszGaweda
Copy link
Contributor Author

run-cdc-debezium-tests

@AyberkSorgun AyberkSorgun changed the title No error on null key No error on null key [HZ-2086] Feb 28, 2023
@AyberkSorgun AyberkSorgun added this to the 5.3.0 milestone Feb 28, 2023
.debezium("postgres", PostgresConnector.class)
.setProperty("database.server.name", "dbserver1")
.setProperty("database.hostname", container.getHost())
.setProperty("database.port", Integer.toString(container.getMappedPort(POSTGRESQL_PORT)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use container.getFirstMappedPort() instead of container.getMappedPort()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can, but I think it's more explicit this way - I guess it's personal preference

try (Connection connection = getPostgreSqlConnection(container.getJdbcUrl(), container.getUsername(),
container.getPassword())) {
connection.setSchema("inventory");
Statement statement = connection.createStatement();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Statement should be closed.
try (Statement statement = connection.createStatement()) {...}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! c63631c

@TomaszGaweda TomaszGaweda requested a review from orcunc March 1, 2023 12:08
@TomaszGaweda TomaszGaweda merged commit 3399eab into hazelcast:master Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with CDC and Postgres [HZ-2086]
4 participants