Skip to content

Commit

Permalink
consumer group: clarify log line
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Nov 15, 2022
1 parent 8ab8074 commit 6bbe188
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/kgo/consumer_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -1852,8 +1852,11 @@ func (g *groupConsumer) updateCommitted(
if req.Generation != g.generation {
return
}
if g.uncommitted == nil || // just in case
len(req.Topics) != len(resp.Topics) { // bad kafka
if g.uncommitted == nil {
g.cfg.logger.Log(LogLevelWarn, "received an OffsetCommitResponse after our group session has ended, unable to handle this (were we kicked from the group?)")
return
}
if len(req.Topics) != len(resp.Topics) { // bad kafka
g.cfg.logger.Log(LogLevelError, fmt.Sprintf("broker replied to our OffsetCommitRequest incorrectly! Num topics in request: %d, in reply: %d, we cannot handle this!", len(req.Topics), len(resp.Topics)), "group", g.cfg.group)
return
}
Expand Down

0 comments on commit 6bbe188

Please sign in to comment.