Skip to content

Commit

Permalink
Merge #31727
Browse files Browse the repository at this point in the history
31727: storage: disambiguate raft progress string r=petermattis a=tschottdorf

Release note: None

Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
  • Loading branch information
craig[bot] and tbg committed Oct 23, 2018
2 parents 01e0cfb + 49bf5c5 commit 0ccdbfa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/storage/replicate_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,10 @@ func (rq *replicateQueue) purgatoryChan() <-chan time.Time {
// rangeRaftStatus pretty-prints the Raft progress (i.e. Raft log position) of
// the replicas.
func rangeRaftProgress(raftStatus *raft.Status, replicas []roachpb.ReplicaDescriptor) string {
if raftStatus == nil || len(raftStatus.Progress) == 0 {
return "[raft progress unknown]"
if raftStatus == nil {
return "[no raft status]"
} else if len(raftStatus.Progress) == 0 {
return "[no raft progress]"
}
var buf bytes.Buffer
buf.WriteString("[")
Expand Down

0 comments on commit 0ccdbfa

Please sign in to comment.