Skip to content

Commit

Permalink
bugfix: AsyncProducer retryBatch causes goroutines to be leaked
Browse files Browse the repository at this point in the history
retryBatch caused the brokerRefs count to be incremented (getBrokerProducer), but it is never decremented again, so the
goroutines related to the brokerProducer are leaked.
  • Loading branch information
k-wall committed Apr 11, 2022
1 parent 9473433 commit de2038a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions async_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ func (p *asyncProducer) retryBatch(topic string, partition int32, pSet *partitio
}
bp := p.getBrokerProducer(leader)
bp.output <- produceSet
p.unrefBrokerProducer(leader, bp)
}

func (bp *brokerProducer) handleError(sent *produceSet, err error) {
Expand Down

0 comments on commit de2038a

Please sign in to comment.