Skip to content

Commit

Permalink
fix: client.Lag doesn't calculate lag for all consumergroups with cli…
Browse files Browse the repository at this point in the history
…ent.Lag(ctx)

Signed-off-by: Girish Kumar <[email protected]>
  • Loading branch information
0xgirish committed Apr 26, 2024
1 parent 6a58760 commit cf209db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/kadm/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,12 @@ func (cl *Client) Lag(ctx context.Context, groups ...string) (DescribedGroupLags
}
if g.Err != nil {
delete(set, g.Group)
continue
}

// if no groups were specified for lag calculation, we will calculate lag for all groups
// adding groups to the set again.
set[g.Group] = struct{}{}
}
if len(set) == 0 {
return lags, nil
Expand Down

0 comments on commit cf209db

Please sign in to comment.