Browse Source

Merge pull request #10635 from jingyih/add_learner_field_to_progress_stringer

raft: add learner field to progress stringer
Xiang Li 6 years ago
parent
commit
f29b1ada19
1 changed files with 2 additions and 1 deletions
  1. 2 1
      raft/progress.go

+ 2 - 1
raft/progress.go

@@ -185,7 +185,8 @@ func (pr *Progress) needSnapshotAbort() bool {
 }
 
 func (pr *Progress) String() string {
-	return fmt.Sprintf("next = %d, match = %d, state = %s, waiting = %v, pendingSnapshot = %d", pr.Next, pr.Match, pr.State, pr.IsPaused(), pr.PendingSnapshot)
+	return fmt.Sprintf("next = %d, match = %d, state = %s, waiting = %v, pendingSnapshot = %d, recentActive = %v, isLearner = %v",
+		pr.Next, pr.Match, pr.State, pr.IsPaused(), pr.PendingSnapshot, pr.RecentActive, pr.IsLearner)
 }
 
 type inflights struct {