-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
khepri_machine: Use an effect to initialize new projections
Previously the machine would initialize projections in-place within `apply/3`. That would cause projections to be restored ahead of time when the machine was recovering if it applied a `#register_projection{}` command. We can use an aux effect instead for the creation and initial filling of the projection's ETS table. Aux effects are skipped during recovery. Once the machine is fully recovered and the server enters the `recovered` state, we emit a `restore_projections` aux effect that properly (re)creates and fills the projections. (This is already done by `khepri_machine`.)
- Loading branch information
1 parent
216c290
commit b509150
Showing
2 changed files
with
29 additions
and
19 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