Skip to content

Commit de2038a

Browse files
committed
bugfix: AsyncProducer retryBatch causes goroutines to be leaked
retryBatch caused the brokerRefs count to be incremented (getBrokerProducer), but it is never decremented again, so the goroutines related to the brokerProducer are leaked.
1 parent 9473433 commit de2038a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

async_producer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ func (p *asyncProducer) retryBatch(topic string, partition int32, pSet *partitio
10641064
}
10651065
bp := p.getBrokerProducer(leader)
10661066
bp.output <- produceSet
1067+
p.unrefBrokerProducer(leader, bp)
10671068
}
10681069

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

0 commit comments

Comments
 (0)