Skip to content

Comments

feat: Recovery based on only the last event#32629

Merged
patriknw merged 7 commits intomainfrom
wip-recover-last-patriknw
Jan 28, 2025
Merged

feat: Recovery based on only the last event#32629
patriknw merged 7 commits intomainfrom
wip-recover-last-patriknw

Conversation

@patriknw
Copy link
Contributor

@patriknw patriknw commented Jan 23, 2025

  • Introduced in a compatible way so that it still works if used with a plugin that doesn't implement this. In that case the snapshot will still not be loaded but all events will be replayed instead of only the last.
  • I'll add some more tests

* Introduced in a compatible way so that it still works if used with
  a plugin that doesn't implement this. In that case the snapshot will
  still not be loaded but all events will be replayed instead of only
  the last.

optional(flag = supportsReplayOnlyLast) {
"replay only last when fromSequenceNr is -1" in {
journal ! ReplayMessages(-1, Long.MaxValue, Long.MaxValue, pid, receiverProbe.ref)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fromSequenceNr = -1 will be a special magic that a plugin can look for and only replay last event.
that will still work with old plugins, in the way that they will replay all events

@patriknw patriknw changed the title feat: Recovery base on only the last event feat: Recovery based on only the last event Jan 23, 2025
@patriknw patriknw requested a review from aludwiko January 23, 2025 10:40
@patriknw patriknw marked this pull request as ready for review January 23, 2025 15:38
@patriknw
Copy link
Contributor Author

Completed, ready for review

Copy link
Contributor

@johanandren johanandren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impl looks good, something about docs though.

@patriknw patriknw merged commit 7e4e6f1 into main Jan 28, 2025
5 checks passed
@patriknw patriknw deleted the wip-recover-last-patriknw branch January 28, 2025 07:18
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

Successfully merging this pull request may close these issues.

2 participants