Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efficient recovery of CommitLogStoreActor by saving a snapshot #112

Closed
xirc opened this issue Dec 17, 2021 · 0 comments · Fixed by #114
Closed

Efficient recovery of CommitLogStoreActor by saving a snapshot #112

xirc opened this issue Dec 17, 2021 · 0 comments · Fixed by #114
Labels
enhancement New feature or request
Milestone

Comments

@xirc
Copy link
Contributor

xirc commented Dec 17, 2021

Motivation

CommitLogStoreActor behaves as an event source actor.
Saving a snapshot makes a recovery process efficient if the number of events increases.

Design

The team will address this issue by the following.
Note that some of the details might be changed.

  • Require a snapshot store always
    • Provide a migration guide
  • Use lerna.akka.entityreplication.raft.eventsourced.persistence.snapshot-store.plugin to configure a snapshot store plugin ID. The default value is empty string "".
  • Save a snapshot after a certain number of events.
    • We can configure the number by using lerna.akka.entityreplication.raft.eventsourced.persistence.snapshot-every.
    • The default value is 1000.
  • Add at least two public APIs to RaftSettings.
    • def eventSourcedSnapshotStorePluginId: String
    • def eventSourcedSnapshotEvery: Int
  • Add at least one public API to ClusterReplicationSettings (both classic and typed)
    • def withEventSourcedSnapshotStorePluginId: ClusterReplicationSettings
  • Introduce a new state class and save it as a snapshot
    • This class contains only a value of typeLogEntryIndex now
  • Add a unit test of CommitLogStoreActor
  • Update documents (/docs/*)
@xirc xirc added this to the v2.1.0 milestone Dec 17, 2021
@xirc xirc added the enhancement New feature or request label Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant