-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vsr: decide commit_max separately from acting on it
Before, `commit_journal` played dual role: * it advanced commit_max * it tried executing everything up to commit_max In parciular, we had funny calls `commit_journal(self.commit_max)`, which neutered the first role in a somewhat roundabout way. Now, we have two functions: * "sensitive" `advance_commit_max` to be called when you have learned something that justifies _logically_ committing more * "safe" `commit_journal`, which can be called whenever, and just executes locally available prepares up to commit_max There shouldn't be any behavior changes here, but in the next commit I'll tweak the logic in `on_prepare` to advance commit_max _before_ appending the prepare, so as not to break op/commit_max invariant even temporarily.
- Loading branch information
Showing
1 changed file
with
42 additions
and
34 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