Skip to content

Commit aaf61ff

Browse files
author
Gabriel Tincu
committed
Update docstring
1 parent 016b8c9 commit aaf61ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kafka/producer/sender.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def _handle_produce_response(self, node_id, send_time, batches, response):
196196
for topic, partitions in response.topics:
197197
for partition_info in partitions:
198198
global_error = None
199+
log_start_offset = None
199200
if response.API_VERSION < 2:
200201
partition, error_code, offset = partition_info
201202
ts = None
@@ -208,7 +209,7 @@ def _handle_produce_response(self, node_id, send_time, batches, response):
208209
tp = TopicPartition(topic, partition)
209210
error = Errors.for_code(error_code)
210211
batch = batches_by_partition[tp]
211-
self._complete_batch(batch, error, offset, ts, global_error)
212+
self._complete_batch(batch, error, offset, ts, log_start_offset, global_error)
212213

213214
if response.API_VERSION > 0:
214215
self._sensors.record_throttle_time(response.throttle_time_ms, node=node_id)
@@ -227,6 +228,7 @@ def _complete_batch(self, batch, error, base_offset, timestamp_ms=None, log_star
227228
base_offset (int): The base offset assigned to the records if successful
228229
timestamp_ms (int, optional): The timestamp returned by the broker for this batch
229230
log_start_offset (int): The start offset of the log at the time this produce response was created
231+
global_error (Exception): The summarising error message
230232
"""
231233
# Standardize no-error to None
232234
if error is Errors.NoError:

0 commit comments

Comments
 (0)