-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed interactions with soft delete and CDC resync (#961)
Resync works by performing initial load to a table with the suffix `_resync`, renaming it to the destination table name and then resuming CDC. This ensures maximum availability of the table for the customer as the downtime is scoped to the renaming phase. Since soft-deleted rows are not present on the source, this can lead to such rows disappearing after resync, as initial load just copies the source tables over. This is fixed by adding an additional step to `INSERT` rows from the destination table with primary keys not present in the `_resync` table, before the renaming. This ensures all soft-deleted rows are captured and retained after resync. The synced at column is also updated for these rows.
- Loading branch information
1 parent
d3c23f8
commit 785cbfc
Showing
1 changed file
with
51 additions
and
7 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