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

deliver anti-events when pruning #399

Open
rkuhn opened this issue Mar 27, 2023 · 2 comments
Open

deliver anti-events when pruning #399

rkuhn opened this issue Mar 27, 2023 · 2 comments
Assignees

Comments

@rkuhn
Copy link
Member

rkuhn commented Mar 27, 2023

When #388 is done, users will be able to place app events into ephemeral event streams, leading to them getting pruned. Currently, this happens without informing apps that have running subscriptions or stored state snapshots, meaning that admins need to carefully consider to only prune events where no inconsistencies can arise.

The easiest way to erase inconsistencies is to emit anti-events for those events that are being pruned. This should nuke state snapshots as well as lead to time travel for machine-runner.

Implementing this requires changes to (or audit of) the Actyx SDK and Pond in order to ensure that anti-events are correctly understood. We’ll also need to test what happens when a new Actyx version emits anti-events to an old Pond app.

@rkuhn
Copy link
Member Author

rkuhn commented Mar 27, 2023

A large part of this problem is already solved by subscribeMonotonic: when an old event goes away, there will be a timeTravel notification with the appropriate event key, taking care of rebuilding Fish or machine state.

The only place needing more anti-events is running subscribe queries, which can now emit them even without using AGGREGATE (and AGGREGATE implementations may need to restart from scratch, in particular for FIRST(_)).

@jmg-duarte jmg-duarte self-assigned this Apr 6, 2023
@jmg-duarte
Copy link
Contributor

Start by understanding the subscribe infra and live events

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