You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is great, but because the election code is responsible for incrementing the term number, we end up skipping this update for one-node clusters as well. This means we can have two distinct leaders that share a term number, as happens in this test:
When the current configuration contains only one node, we have a fast path in raft to skip the election and move directly from follower to leader:
dqlite/src/raft/convert.c
Lines 171 to 180 in 6035a35
This is great, but because the election code is responsible for incrementing the term number, we end up skipping this update for one-node clusters as well. This means we can have two distinct leaders that share a term number, as happens in this test:
dqlite/test/integration/test_cluster.c
Line 127 in 6035a35
I think this behavior is unintuitive at best and we should add a term number increase on the fast path.
The text was updated successfully, but these errors were encountered: