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

release/v21.03: fix(raftwal): take snapshot after restore (#7719) #7750

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Apr 26, 2021

We should propose a snapshot immediately after the restore to prevent the restore from being replayed.
Earlier we were trying to do that too. Snapshot happens after the restore but that does not actually include the restore proposal as it has not been applied yet (n.Applied.Done() is not yet called for that proposal).
Now, we will first wait for the raft entry to be marked as done and then try to propose the snapshot.

(cherry picked from commit 72cebd1)


This change is Reviewable

We should propose a snapshot immediately after the restore to prevent the restore from being replayed.
Earlier we were trying to do that too. Snapshot happens after the restore but that does not actually include the restore proposal as it has not been applied yet (n.Applied.Done() is not yet called for that proposal).
Now, we will first wait for the raft entry to be marked as done and then try to propose the snapshot.

(cherry picked from commit 72cebd1)
@github-actions github-actions bot added the area/testing Testing related issues label Apr 26, 2021
@NamanJain8 NamanJain8 changed the title fix(raftwal): take snapshot after restore (#7719) release/v21.03: fix(raftwal): take snapshot after restore (#7719) Apr 26, 2021
@NamanJain8 NamanJain8 merged commit 02305d8 into release/v21.03 Apr 26, 2021
@NamanJain8 NamanJain8 deleted the naman/cp/restore-snap branch April 26, 2021 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Testing related issues
Development

Successfully merging this pull request may close these issues.

2 participants