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

Base event migration on minimum in-progress transaction id #406

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

erikrozendaal
Copy link
Member

The online replay process replays all events that have a transaction id less than the minimum in-progress transaction id. The offline replay process then replays all events inserted with a greater or equal transaction id.

This avoids having to track all replayed event ids during the online process and excluding these during the offline process. This increases performance is in both processes.

The online replay process replays all events that have a transaction
id less than the minimum in-progress transaction id. The offline
replay process then replays all events inserted with a greater or
equal transaction id.

This avoids having to track all replayed event ids during the online
process and excluding these during the offline process. This increases
performance is in both processes.
When the online migration is finished it will show the number of
events that will still need to be applied for the offline
migration. This gives some indication of how long this process will
take.
@erikrozendaal erikrozendaal force-pushed the replay-using-postgres-minimum-transaction-id branch from d0f766e to ff876fd Compare February 5, 2024 12:12
@erikrozendaal erikrozendaal marked this pull request as ready for review February 5, 2024 13:10
Copy link
Member

@lvonk lvonk left a comment

Choose a reason for hiding this comment

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

Nice, It would be nice if we would also drop the ReplayedIds table.

lib/sequent/migrations/view_schema.rb Show resolved Hide resolved
@erikrozendaal erikrozendaal merged commit 9b5d5b6 into master Feb 6, 2024
9 checks passed
@erikrozendaal erikrozendaal deleted the replay-using-postgres-minimum-transaction-id branch February 6, 2024 15:37
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