From 009ed92894b03a95a473359e64c5499665697b10 Mon Sep 17 00:00:00 2001 From: Omar Ghishan Date: Thu, 2 Jan 2014 18:14:44 -0800 Subject: [PATCH] Add note about questionable error handling while decoding messages. Will remove once any error handling issues are resolved. --- kafka/protocol.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kafka/protocol.py b/kafka/protocol.py index 74a0dce..54b8eee 100644 --- a/kafka/protocol.py +++ b/kafka/protocol.py @@ -119,6 +119,14 @@ class KafkaProtocol(object): read_message = True yield OffsetAndMessage(offset, message) except BufferUnderflowError: + # NOTE: Not sure this is correct error handling: + # Is it possible to get a BUE if the message set is somewhere + # in the middle of the fetch response? If so, we probably have + # an issue that's not fetch size too small. + # Aren't we ignoring errors if we fail to unpack data by + # raising StopIteration()? + # If _decode_message() raises a ChecksumError, couldn't that + # also be due to the fetch size being too small? if read_message is False: # If we get a partial read of a message, but haven't # yielded anything there's a problem