Sfoglia il codice sorgente

raft: remove wrong invariant

The commit > unstable might not true for follower. The leader only need
to ensure the entry is stored on the majority of nodes to commit an
entry. So the minority of the cluster might receive commit > unstable
append request. This is normal.
Xiang Li 10 anni fa
parent
commit
0ca6be31f8
1 ha cambiato i file con 0 aggiunte e 1 eliminazioni
  1. 0 1
      raft/log.go

+ 0 - 1
raft/log.go

@@ -31,7 +31,6 @@ type raftLog struct {
 
 
 	// committed is the highest log position that is known to be in
 	// committed is the highest log position that is known to be in
 	// stable storage on a quorum of nodes.
 	// stable storage on a quorum of nodes.
-	// Invariant: committed < unstable
 	committed uint64
 	committed uint64
 	// applied is the highest log position that the application has
 	// applied is the highest log position that the application has
 	// been instructed to apply to its state machine.
 	// been instructed to apply to its state machine.