Skip to content

Commit 642b640

Browse files
committed
Warn if pending batches failed during flush
1 parent f2d10f0 commit 642b640

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kafka/producer/record_accumulator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,9 @@ def await_flush_completion(self):
457457
"""
458458
for batch in self._incomplete.all():
459459
batch.produce_future.await()
460+
assert batch.produce_future.is_done
461+
if batch.produce_future.failed():
462+
log.warning(batch.produce_future.exception)
460463
self._flushes_in_progress.decrement()
461464

462465
def abort_incomplete_batches(self):

0 commit comments

Comments
 (0)