Skip to content

Commit

Permalink
Indicate the leader in js watch
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <[email protected]>
  • Loading branch information
ripienaar committed Sep 26, 2024
1 parent db5dbae commit be9afed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli/server_watch_js_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,18 @@ func (c *SrvWatchJSCmd) redraw(drawPending bool) error {

for _, srv := range matched {
js := srv.Stats.JetStream.Stats
name := srv.Server.Name

pending := 0
if srv.Stats.JetStream.Meta != nil {
pending = srv.Stats.JetStream.Meta.Pending
if srv.Stats.JetStream.Meta.Leader == name {
name = name + "*"
}
}

row := []any{srv.Server.Name,
row := []any{
name,
f(js.HAAssets),
fiBytes(js.Memory),
fiBytes(js.Store),
Expand Down

0 comments on commit be9afed

Please sign in to comment.