-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#23013] XClusterDDLRepl: Link producer table to consumer table by ta…
…ble id Summary: Currently we use table names to match tables when setting up replication, but for DDL replication this can cause some issues. Eg if the table is created and then renamed, then we cannot match the tables. Alternatively if a table is created, dropped then recreated, then the producer would have two tables with the same name (since the first one is just hidden). Fixing this to capture the table id of all created relations and storing that in the json in ddl_queue. The ddl_queue handler then updates the tserver's xcluster_context with this information, so when the next PgCreateTable requests go through, they can check this map and add the producer table id to the xcluster_source_table_id field. This is then picked up by the add_table_to_xcluster_target task and used to perform the replication set up. **Upgrade/Rollback safety:** Only adding in new fields, which are guarded behind ddl replication flags Jira: DB-11942 Test Plan: ``` ybd --cxx-test xcluster_ddl_replication-test --gtest_filter "XClusterDDLReplicationTest.DuplicateTableNames" ``` Reviewers: xCluster, hsunder Reviewed By: hsunder Subscribers: yql, ybase Differential Revision: https://phorge.dev.yugabyte.com/D35874
- Loading branch information
Showing
40 changed files
with
549 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.