Skip to content

Commit

Permalink
Re ordered the TabletHealth struct as it was before and added a todo …
Browse files Browse the repository at this point in the history
…for v15

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
  • Loading branch information
frouioui committed Jun 2, 2022
1 parent 90b6d2a commit 82d8658
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions go/vt/discovery/tablet_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ type TabletHealth struct {
Conn queryservice.QueryService
Tablet *topodata.Tablet
Target *query.Target
Serving bool
PrimaryTermStartTime int64
Stats *query.RealtimeStats
PrimaryTermStartTime int64
LastError error
Serving bool
}

func (th *TabletHealth) MarshalJSON() ([]byte, error) {
Expand All @@ -68,11 +68,16 @@ func (th *TabletHealth) MarshalJSON() ([]byte, error) {
// TODO: remove Up in v15
Up: true,

Serving: th.Serving,
Serving: th.Serving,

// We copy the PrimaryTermStartTime value onto TabletExternallyReparentedTimestamp to
// ensure backward compatibility.
// TODO: remove Up in v15
PrimaryTermStartTime: th.PrimaryTermStartTime,
TabletExternallyReparentedTimestamp: th.PrimaryTermStartTime,
Stats: th.Stats,
LastError: th.LastError,

Stats: th.Stats,
LastError: th.LastError,
})
}

Expand Down

0 comments on commit 82d8658

Please sign in to comment.