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

Fix a bug in Raft.Run loop #2606

Merged
merged 1 commit into from
Sep 21, 2018
Merged

Fix a bug in Raft.Run loop #2606

merged 1 commit into from
Sep 21, 2018

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Sep 21, 2018

When retrieving a snapshot, wait until all the pending updates are applied via the applyCh. Otherwise, these updates would get applied after applying the snapshot, which would cause Dgraph to change the state of the data in unpredictable ways.

Also send the entire list of Committed Entries in one shot to applyCh, instead of sending each entry one by one. This is less contentious for Go channels.


This change is Reviewable

@manishrjain manishrjain merged commit 47dd180 into master Sep 21, 2018
@manishrjain manishrjain deleted the mrjn/applych branch September 21, 2018 21:54
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
When retrieving a snapshot, wait until all the pending updates are applied via the applyCh. Otherwise, these updates would get applied after applying the snapshot, which would cause Dgraph to change the state of the data in unpredictable ways.

Also send the entire list of Committed Entries in one shot to applyCh, instead of sending each entry one by one. This is less contentious for Go channels.
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