Skip to content

Commit

Permalink
kvserver: implement Liveness.String() on value receiver
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andreimatei committed Oct 15, 2020
1 parent 6af3968 commit aac6ece
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 aac6ece

Please sign in to comment.