From 6b7891c643a1c429b26ae477c67dd29cb3665707 Mon Sep 17 00:00:00 2001 From: xujun Date: Fri, 24 Apr 2015 03:28:57 -0400 Subject: [PATCH] raft: fix typo in raftlog fix typo in String() method of raftlog which will misorder the "committed" and "unstable.offset" output. --- raft/log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft/log.go b/raft/log.go index 4da815a49..ad195c7ec 100644 --- a/raft/log.go +++ b/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,