diff --git a/pkg/kgo/sink.go b/pkg/kgo/sink.go index 731e35e2..a2392c69 100644 --- a/pkg/kgo/sink.go +++ b/pkg/kgo/sink.go @@ -549,10 +549,10 @@ func (s *sink) handleReqResp(req *produceRequest, resp kmsg.Response, err error) for partition, batch := range partitions { batch.owner.mu.Lock() if batch.isOwnersFirstBatch() { - s.cl.finishBatch(batch.recBatch, req.producerID, req.producerEpoch, partition, 0, nil) if debug { - fmt.Fprintf(b, "%d{%d=>%d}, ", partition, 0, len(batch.records)) + fmt.Fprintf(b, "%d{0=>%d}, ", partition, len(batch.records)) } + s.cl.finishBatch(batch.recBatch, req.producerID, req.producerEpoch, partition, 0, nil) } else if debug { fmt.Fprintf(b, "%d{skipped}, ", partition) }