Explorar o código

raft: fix typo in raftlog

fix typo in String() method of raftlog which will misorder
the "committed" and "unstable.offset" output.
xujun %!s(int64=11) %!d(string=hai) anos
pai
achega
6b7891c643
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      raft/log.go

+ 1 - 1
raft/log.go

@@ -65,7 +65,7 @@ func newLog(storage Storage) *raftLog {
 }
 
 func (l *raftLog) String() string {
-	return fmt.Sprintf("committed=%d, applied=%d, unstable.offset=%d, len(unstable.Entries)=%d", l.unstable.offset, l.committed, l.applied, len(l.unstable.entries))
+	return fmt.Sprintf("committed=%d, applied=%d, unstable.offset=%d, len(unstable.Entries)=%d", l.committed, l.applied, l.unstable.offset, len(l.unstable.entries))
 }
 
 // maybeAppend returns (0, false) if the entries cannot be appended. Otherwise,