Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
32572: storage: improve raftDescribeMessage RejectHint handling r=petermattis a=tbg

The RejectHint is always used. See:

cockroachdb#32533 (comment)

Release note: None

Co-authored-by: Tobias Schottdorf <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Nov 23, 2018
2 parents 9363293 + 610872e commit 1bcb46e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/storage/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ func raftDescribeMessage(m raftpb.Message, f raft.EntryFormatter) string {
var buf bytes.Buffer
fmt.Fprintf(&buf, "%x->%x %v Term:%d Log:%d/%d", m.From, m.To, m.Type, m.Term, m.LogTerm, m.Index)
if m.Reject {
fmt.Fprintf(&buf, " Rejected")
if m.RejectHint != 0 {
fmt.Fprintf(&buf, "(Hint:%d)", m.RejectHint)
}
fmt.Fprintf(&buf, " Rejected (Hint: %d)", m.RejectHint)
}
if m.Commit != 0 {
fmt.Fprintf(&buf, " Commit:%d", m.Commit)
Expand Down

0 comments on commit 1bcb46e

Please sign in to comment.