Skip to content

Snapshots are not used only for optimization #11

Open

Description

@object

I don't know if you still maintain this project @Horusiath but we are actively using your library so I'd like to address an issue with snapshotting.

  1. It would be great if snapshots could be switched on and off. Settings don't have a property for that. Can this be achieved by setting SnapshotInterval to a number that can not be reached, like MaxInt?

  2. Snapshots are not used only for optimization. The way they are implemented makes them contain data that are no longer present in the EventJournal table (because it's cleaned after saving a snapshot). This goes against the principle of snapshot being a copy of data. Deleting a snapshot causes data loss. Can this be changed? If you agree that's a good idea I can work on a PR for this.

Activity

  1. Horusiath commented on Apr 9, 2022

    @Horusiath
    Collaborator

    Re:

    1. Yes, if you set it to high enough number you probably will never reach the point for a snapshot to happen.
    2. Snapshots were originally there to allow us to truncate the event log. The focus of reminders is not specifically about eventsourcing at all - it's primarily about persistence of scheduled messages. It just happens that Akka.Persistence gives us generic mechanism for persisting state via event log. If you have some some idea feel free to talk your mind :) We'll see what we could do with it, if it cannot be already achieved using existing tools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions