-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
138297: crosscluster/logical: enable automatic bidi replication r=jeffswenson a=msbutler This patch enables a user to create a bidirectional replication stream with one command. When the user runs `CREATE LOGICALLY REPLICATED TABLE tabB FROM tabA ON uriA WITH BIDIRECTIONAL ON uriB`, the following will happen: - on cluster B, during job planning, construct the reverse stream cmd, while we still have access to original LDR cmd. This command will have the following form: `CREATE LOGICAL REPLICATION STREAM FROM TABLE tabB ON 'uriB' INTO TABLE tabA WITH CURSOR = $1, PARENT = '{og job id}';` - on cluster B, create table tabB and begin an offline scan, as normal - on cluster B, once the offline scan completes, but before tabB is published, set up the reverse stream from B to A at a cursor time after the initial scan completes but before the tabB has come online. This cursor time prevents data looping and ensures the replication of all future foreground writes. - on cluster B, steady state replication begins. Epic: none Release note (sql change): when a user runs CREATE LOGICALLY REPLICATED TABLE, they must specify one of the following options: - UNIDIRECTIONAL: setups a unidirectional stream with fast initial scan - BIDIRECTIONAL ON {dest uri}: sets up a bidirectional stream from the original dest to the original source. Co-authored-by: Michael Butler <[email protected]>
- Loading branch information
Showing
17 changed files
with
309 additions
and
36 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
Oops, something went wrong.