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

Do not update ra_log_snapshot_state from snapshot writer process. #455

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

kjnilsson
Copy link
Contributor

@kjnilsson kjnilsson commented Jul 12, 2024

As this could cause entries not to be written to the WAL (as it thinks they will never be read) but the main ra process is not yet aware of the snapshot and thus may try to read these entries.

This line was never necessary, it was an attempt at an optimisation for the checkpoints feature.

also:

Clear out older checkpoint when a snapshot is installed else this could cause old checkpoints to be promoted.

As this could cause entries not to be written to the WAL (as it thinks
they will never be read) but the main ra process is not yet aware
of the snapshot and thus may try to read these entries.
Else this could cause old checkpoints to be promoted.
@mkuratczyk mkuratczyk assigned mkuratczyk and unassigned mkuratczyk Jul 15, 2024
@mkuratczyk mkuratczyk self-requested a review July 15, 2024 13:51
Copy link
Contributor

@mkuratczyk mkuratczyk left a comment

Choose a reason for hiding this comment

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

We've tested the same workload that had triggered the issue before and we can no longer reproduce it, even after "helping" manually (ra:local_query(FollowerId, fun (_) -> timer:sleep(10000) end)).

@kjnilsson kjnilsson merged commit 88e2ab2 into main Jul 15, 2024
12 checks passed
@michaelklishin michaelklishin deleted the checkpoints-fix branch August 6, 2024 18:43
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