-
Notifications
You must be signed in to change notification settings - Fork 137
membership rollback issue #250
Comments
One possible solution would be to take a snapshot only if there is no uncommitted configuration, and to restore the configuration from the snapshot if there is no configuration entry in the log. |
Thanks for this, will investigate. |
Lines 16 to 87 in cbb9cd7
The most recent configuration might not be a committed one, which would probably lead to another membership rollback issue. |
There are degenerate cases where not taking a snapshot while there's an uncommitted configuration could lead to never taking a snapshot anymore. There's this fragment in the raft dissertation in Chapter 5
In think the straightforward solution is to save the last known configuration when taking a snapshot so that it can be restored. |
Yeah, I think you might be right. We just need to save the previous configuration if there is an uncommitted one when taking a snapshot. But I have to say that an uncommitted configuration could still stand in the way because a snapshot can never be taken beyond any uncommitted index. |
It seems pretty clear to me that the description of Raft in the dissertation envisions that
So if we're storing uncommitted configurations in snapshots at all, that seems like a deviation from the algorithm as presented. |
raft/src/membership.c
Line 160 in ad00295
The assertion may fail if the configuration entry has already been removed. In addition, an uncommitted configuration may be stored in a snapshot, making it impossible to roll back.
The text was updated successfully, but these errors were encountered: