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

Snapshots are not used only for optimization #11

Open
object opened this issue Apr 5, 2022 · 1 comment
Open

Snapshots are not used only for optimization #11

object opened this issue Apr 5, 2022 · 1 comment

Comments

@object
Copy link
Owner

object commented Apr 5, 2022

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.

@Horusiath
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants