-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
khepri_machine: "Update" projections when a snapshot is installed
When a snapshot is installed the machine state is "swapped" from the state before the snapshot to the one contained in the snapshot. This swap jumps over potentially many commands in the log which we would have used to trigger projections. When we install a snapshot we need to update the projection state but it's not as straightforward as when "restoring" projections (on machine recovery for example) because the projection tables will already exist and potentially contain records. When we detect that a snapshot has been installed we need to diff the old and new states to find which projections have changed themselves and also update their associated projection tables.
- Loading branch information
1 parent
8b6c63e
commit 09f2b9f
Showing
2 changed files
with
232 additions
and
40 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