Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Snapshots: Use lastReceived event in metadata? #309

Closed
agido-hundt opened this issue Sep 12, 2016 · 1 comment
Closed

Snapshots: Use lastReceived event in metadata? #309

agido-hundt opened this issue Sep 12, 2016 · 1 comment
Milestone

Comments

@agido-hundt
Copy link
Contributor

Hi @krasserm,

today we paid attention on the snapshot topic. I was wondering why Eventuate considers the lastHandled event for the snapshot write/read process.

Let's assume the following case:

  1. We have actor A and B and two events E1 and E2.
  2. Actor A consumes E1 and actor B consumes E2.
  3. Let's say we have just few E1's and millions of E2.
  4. When writing a snapshot actor A takes the lastSequenceNo of the latest consumed E1, ignoring the maybe millions of E2 afterwards.
    On the next actor recovery, it takes much longer as it needs to.

My question: Wouldn't it be better to take the sequenceNo of the "lastReceived" event instead? Actor A then can start with replication progress with a much higher sequenceNo.

@krasserm
Copy link
Contributor

Good catch, thanks for the hint @ermanito. Will schedule the ticket for 0.8. Do you want to make a PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants