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

Allow raft to recover state after non-graceful shutdown in non-archive mode #860

Merged
merged 14 commits into from
Dec 2, 2019

Conversation

vsmk98
Copy link
Contributor

@vsmk98 vsmk98 commented Oct 18, 2019

System information
Geth version: v2.2.4

OS & Version: Windows/Linux/OSX

Expected behaviour
In case of non graceful shutdown of a node running with Raft consensus, when the node joins back the network it should be able to sync up with rest of network.

Actual behaviour
Post non graceful shutdown of the node, the node is not able sync up with the network. Logs show the following error:

INFO [07-31|21:23:33.543] Handling InvalidRaftOrdering invalid block=7c5057…f40b82 current head=62b814…1d78dd
INFO [07-31|21:23:33.551] Someone else mined invalid block; ignoring block=7c5057…f40b82

Steps to reproduce the behaviour
Bring up the network with geth nodes running in --gcmode full
Do a non-graceful shutdown of one of the nodes kill -9 and bring back the node

Closes #814, fixes #807

prd-fox
prd-fox previously approved these changes Oct 18, 2019
@prd-fox prd-fox changed the title Fix/raft enable gcmode full Allow raft to recover state after non-graceful shutdown in non-archive mode Oct 18, 2019
@SatpalSandhu61
Copy link
Contributor

FYI I've been performing some investigation to reproduce a scenario where disk filling up was causing raft issues. I discovered that when disk space ran out, raft crashed and corrupted the logs, in the same way as when it's killed non-gracefully.

I re-tested using your branch (3 times) and can confirm that your code changes fix the issue for my scenario too.

jbhurat
jbhurat previously approved these changes Oct 18, 2019
Copy link
Contributor

@jbhurat jbhurat left a comment

Choose a reason for hiding this comment

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

LGTM

@vsmk98 vsmk98 dismissed stale reviews from jbhurat and prd-fox via e55a68a November 6, 2019 02:54
Copy link
Contributor

@trung trung left a comment

Choose a reason for hiding this comment

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

Changes include:

@jpmsam jpmsam merged commit 882a303 into master Dec 2, 2019
@trung trung deleted the fix/raft-enable-gcmode-full branch December 6, 2019 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants