case SaveSnapshotSuccess(metadata) =>
println(s"snapshot saved. seqNum:${metadata.sequenceNr},
timeStamp:${metadata.timestamp}")
deleteMessages(metadata.sequenceNr - eventDeleteOffset)
Isn't this falsey? event is about snapshot, deleteMessages(..) is about
snapshot, they are
Thanks for sharing, Brice. That is an important finding.
On Wed, Dec 2, 2015 at 2:23 PM, Brice Figureau
wrote:
> On 18/02/2014 21:39, dpenn...@good-cloud.com wrote:
> > I would assume that a common scenario is to periodically snapshot state
> > and keep 1 or more
On 18/02/2014 21:39, dpenn...@good-cloud.com wrote:
> I would assume that a common scenario is to periodically snapshot state
> and keep 1 or more snapshots. In this case, I assume that as you delete
> older snapshots, you would also delete messages older than the snapshot
> from the journal in
Hey,
I'm implementing a PersistentActor which batches writes for a db. After
successfully writing a batch I can't figure out how to determine the latest
message number I should use to pass to deleteMessages to prevent the events
I just persisted to the db from appearing in the recovery. Any
Make sure you're receiving the snapshot success message.
case SaveSnapshotSuccess(metadata) = {
deleteMessages(metadata.sequenceNr, true)
}
You can also save that metadata in case you want to clean up snapshots. Per
Patrik's comment, you may want to verify that some interval has passed
Agreed - in our legacy system, we have a storage manager that removes old
journals and snapshots as space is needed. The old journals are sometimes
very useful for postmortem analysis.
-david
On Wednesday, February 19, 2014 2:45:17 AM UTC-5, Patrik Nordwall wrote:
You can use deleteMessages
I would assume that a common scenario is to periodically snapshot state and
keep 1 or more snapshots. In this case, I assume that as you delete older
snapshots, you would also delete messages older than the snapshot from the
journal in order to keep the journal from growing indefinitely.
Is
You can use deleteMessages to delete all messages up to a specified
sequence number. I would not use it too eagerly, since the information in
the history can be valuable in itself, but that is of course depending on
the application.
/Patrik
On Tue, Feb 18, 2014 at 9:39 PM,