-
Notifications
You must be signed in to change notification settings - Fork 30
Commit 93a8786
Synchronize Sync and view change proposal deliver to prevent a double commit (#484)
This commit fixes a bug in which a node is unaware of a proposal being committed
by the rest of the nodes, and it attempts a view change which fails, and triggers
a view change timeout, which in turn triggers a sync.
the asynchronous sync procedure may then commit that proposal, and the proposal
will later on be attempted to be committed again once the view change resumes
its operation, because the two procedures are parallel.
The easy and trivial way of solving this would be to make the view change
block until the sync process has ended. While this might work, it makes
the single-threaded view change be dependant on network I/O, which is
might slow down view change for other nodes due to votes being late.
Instead, this commit highjacks the view change commit process and:
1) Waits for any active sync to finish and prevents any syncs from occuring
2) Checks the latest sequence committed and if the proposal being attempted
to be committed by the view change is stale, it calls sync which
would return either the last proposal committed, or a later one.
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
Co-authored-by: C0rWin <artem@bargr.net>1 parent 0ac141d commit 93a8786Copy full SHA for 93a8786
File tree
Expand file treeCollapse file tree
0 file changed
+0
-0
lines changedFilter options
Expand file treeCollapse file tree
0 file changed
+0
-0
lines changed
0 commit comments