storage/apply: rename Batch.Commit to Batch.ApplyToStateMachine#39468
storage/apply: rename Batch.Commit to Batch.ApplyToStateMachine#39468craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
This came out of a discussion with Dan. The method can't be moved to StateMachine because then we'll need a type switch to handle the different kinds of Batch implementations, but it can be renamed to provide more symmetry with StateMachine.ApplySideEffects. The commit also tries to clean up some of the phrasing around the persistent state transition updates and the side-effects of these state transition updates. Release note: None
|
can you elaborate on the type switch? it is similar to the one at the beginning of |
|
No, this would be a type switch on the type of the Making |
|
Gotcha, I forgot about ephemeral batches. LGTM |
|
bors r=danhhz |
39468: storage/apply: rename Batch.Commit to Batch.ApplyToStateMachine r=danhhz a=nvanbenschoten This came out of a discussion with Dan. The method can't be moved to StateMachine because then we'll need a type switch to handle the different kinds of Batch implementations, but it can be renamed to provide more symmetry with StateMachine.ApplySideEffects. The commit also tries to clean up some of the phrasing around the persistent state transition updates and the side-effects of these state transition updates. Release note: None Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
Build succeeded |
This came out of a discussion with Dan. The method can't be moved
to StateMachine because then we'll need a type switch to handle the
different kinds of Batch implementations, but it can be renamed to
provide more symmetry with StateMachine.ApplySideEffects.
The commit also tries to clean up some of the phrasing around the
persistent state transition updates and the side-effects of these
state transition updates.
Release note: None