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

Ignore tables without a valid pgschema_name value #15

Merged
merged 14 commits into from
Apr 11, 2022
Merged

Ignore tables without a valid pgschema_name value #15

merged 14 commits into from
Apr 11, 2022

Conversation

vaibhav-yb
Copy link
Collaborator

@vaibhav-yb vaibhav-yb commented Apr 7, 2022

If a user creates a table old_table with an older version of YugabyteDB, let's say 2.11 and upgrades to a version with the CDCSDK changes, then the old_table would not have the metadata in its TableInfo which has the pgschema_name value. This in turn causes a regression in Debezium connector since it utilizes the schema name to parse the name of the tables, so after upgrade, while filtering the tables, if pgschema_name value is not found in any of the tables, the Debezium connector for YugabyteDB throws a NullPointerException.

This PR addresses the issue and adds the logic to ignore the tables which do not have a pgschema_name value, consequently meaning that the connector is ignoring the tables created using the older versions of YugabyteDB.

Steps to test:

  1. Create a table old_table with YugabyteDB version 2.11 on platform
  2. Upgrade to 2.13.2 and create another table new_table
  3. Create a stream ID and start streaming for new_table
  4. Insert a few rows
  5. Update a few rows
  6. Delete the rows
  7. Restart the connector and repeat steps 4-6

@vaibhav-yb vaibhav-yb requested a review from suranjan April 7, 2022 12:00
Copy link
Collaborator

@suranjan suranjan left a comment

Choose a reason for hiding this comment

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

Please take care of the comment.

@vaibhav-yb vaibhav-yb merged commit ea46407 into yugabyte:final-connector-ybdb Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants