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 retry proposal if already found in CommittedEntries #2740

Merged
merged 3 commits into from
Nov 8, 2018

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Nov 8, 2018

This is the first win from Open Census. Learnt that proposals immediately show up in raft.Ready().CommittedEntries, but then take a long time in the applyCh queue to be applied. If these proposals are just waiting in the queue to be applied, then we're sure that Raft didn't lose them in flight, and therefore, we don't need to re-propose them. This PR detects that and avoids retrying the proposal.


This change is Reviewable

@manishrjain manishrjain merged commit 7a59e8d into master Nov 8, 2018
@manishrjain manishrjain deleted the mrjn/proposal-avoid-retry branch November 8, 2018 19:36
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
…#2740)

This is the first win from Open Census. Learnt that proposals immediately show up in `raft.Ready().CommittedEntries`, but then take a long time in the `applyCh` queue to be applied. If these proposals are just waiting in the queue to be applied, then we're sure that Raft didn't lose them in flight, and therefore, we don't need to re-propose them. This PR detects that and avoids retrying the proposal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant