-
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.
Normalize concurrently with sync flows (#893)
Previously after each sync we'd pause reading slot to process table schema deltas & normalize This has two problems: 1. we want to always be reading slot, we aren't reading slot during normalize 2. merging multiple batches at once can be less expensive Now NormalizeFlow is created as a child workflow at start of cdc flow & a signal is sent after each sync flow with schema updates Normalize consumes all signals since it last checked, merging their processing in parallel with sync flows NormalizeFlow only reads up to the signal's batch id to avoid potentially syncing a batch without its schema This creates a range `(normid..syncid]` in which normid is always catching up to syncid as we normalize `normid+1` to `syncid` Normalize logic already handled this, so it goes untouched in this change `PEERDB_ENABLE_PARALLEL_SYNC_NORMALIZE` needs to be set to true, for now keep this change behind feature flag to avoid potentially increasing data warehouse costs
- Loading branch information
Showing
13 changed files
with
290 additions
and
222 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
Oops, something went wrong.