Skip to content

Commit

Permalink
consuming: do not continually try to create fetch sessions
Browse files Browse the repository at this point in the history
If we fail at creating a fetch session, we should not keep trying.
  • Loading branch information
twmb committed Mar 22, 2022
1 parent 2decd27 commit 85a680e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kgo/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,11 +707,11 @@ func (s *source) fetch(consumerSession *consumerSession, doneFetch chan<- struct
// advance past them).
setOffsets = true

if resp.Version < 7 {
if resp.Version < 7 || resp.SessionID <= 0 {
// If the version is less than 7, we cannot use fetch sessions,
// so we kill them on the first response.
s.session.kill()
} else if resp.SessionID > 0 {
} else {
s.session.bumpEpoch(resp.SessionID)
}

Expand Down

0 comments on commit 85a680e

Please sign in to comment.