Skip to content

Commit

Permalink
errors: make errProducerIDLoadFail retriable
Browse files Browse the repository at this point in the history
When a producer id load fails with a retriable error, we swallow the
error and instead return errProducerIDLoadFail. This gets used when
bumping repeated load failures on partitions, and since this internal
error does not look retriable, we fail records.

We now make this a retriable broker error (since it is), which allows
the producer ID load to fail and be retried.
  • Loading branch information
twmb committed Oct 11, 2021
1 parent 5681be1 commit d623ffe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/kgo/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ func isRetriableBrokerErr(err error) bool {
if isNetClosedErr(err) || errors.Is(err, io.EOF) {
return true
}
// We could have a retriable producer ID failure, which then bubbled up
// as errProducerIDLoadFail so as to be retried later.
if errors.Is(err, errProducerIDLoadFail) {
return true
}
// We could have chosen a broker, and then a concurrent metadata update
// could have removed it.
if errors.Is(err, errChosenBrokerDead) {
Expand Down

0 comments on commit d623ffe

Please sign in to comment.