Merge pull request #10635 from jingyih/add_learner_field_to_progress_stringer

raft: add learner field to progress stringer
This commit is contained in:
Xiang Li
2019-04-11 19:19:13 -07:00
committed by GitHub

View File

@@ -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 {