Explorar o código

raft: add comment to decrTo

Xiang Li %!s(int64=11) %!d(string=hai) anos
pai
achega
70bf464cd6
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      raft/raft.go

+ 2 - 0
raft/raft.go

@@ -69,6 +69,8 @@ func (pr *progress) update(n int64) {
 	pr.next = n + 1
 }
 
+// maybeDecrTo returns false if the given to index comes from an out of order message.
+// Otherwise it decreases the progress next index and returns true.
 func (pr *progress) maybeDecrTo(to int64) bool {
 	// the rejection must be stale if the
 	// progress has matched with follower