Skip to content

Commit

Permalink
Merge #55620
Browse files Browse the repository at this point in the history
55620: kvserver: implement Liveness.String() on value receiver r=andreimatei a=andreimatei

The usual problem with only the pointer implementing Stringer.
Particularly important since NodeLiveness.GetLivenes() returns a value
Liveness.
It used to be implemented on values, but that changed in #50329 for some
reason.

Release note: None

Co-authored-by: Andrei Matei <[email protected]>
  • Loading branch information
craig[bot] and andreimatei committed Oct 16, 2020
2 parents 984bcf1 + aac6ece commit b3574ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/kvserverpb/liveness.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (l *Liveness) Compare(o Liveness) int {
return 0
}

func (l *Liveness) String() string {
func (l Liveness) String() string {
var extra string
if l.Draining || l.Membership.Decommissioning() || l.Membership.Decommissioned() {
extra = fmt.Sprintf(" drain:%t membership:%s", l.Draining, l.Membership.String())
Expand Down

0 comments on commit b3574ed

Please sign in to comment.