-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r/stm: added support for state machines without snapshot at offset cap
To support fast partition movement in Redpanda the `raft::state_machine_base` interface requires state machine implementer to provide support for taking snapshot at arbitrary, already applied offset. This requirement is easy to achieve for all existing state machines as they do not require raft snapshots at all. In future we may leverage the Raft protocol snapshot as they provide a nice way to maintain the bounded log size without compromising consistency. This PR introduces changes to `state_machine_manager` and `state_machine_base` interfaces allowing state machine implementer to opt out from the requirement to provide snapshot at offset capability. Without this feature the partition that the STM is build at will not be fast movable but the `take_snapshot` implementation will be very simple as it will require simply serializing the current in memory state of the state machine. Signed-off-by: Michał Maślanka <[email protected]>
- Loading branch information
1 parent
aeb8e29
commit ace577b
Showing
6 changed files
with
17 additions
and
16 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
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