chia7712 commented on code in PR #24172:
URL: https://github.com/apache/kafka/pull/24172#discussion_r4642776020
##########
clients/src/main/java/org/apache/kafka/common/record/DefaultRecord.java:
##########
Review Comment:
Should we use `RecordSizeLimitExceededException.forSize` for consistency?
##########
clients/src/main/java/org/apache/kafka/common/record/LazyDownConversionRecordsSend.java:
##########
@@ -90,6 +93,15 @@ public int writeTo(TransferableChannel channel, int
previouslyWritten, int remai
// offset of the batch which has the unsupported compression
type. At that time, we will
// send back the UNSUPPORTED_COMPRESSION_TYPE error which will
allow the consumer to fail gracefully.
convertedRecords = buildOverflowBatch(remaining);
+ conversionFailed = true;
+ } catch (RecordSizeLimitExceededException e) {
+ // We have encountered a record whose decompressed body
exceeds the topic's
+ // max.decompressed.message.bytes. As above, we have already
committed to the fetch size, so we send
+ // an overflow batch. The consumer will then fetch from the
offset of the offending batch, at which
+ // point the eager conversion of the first batch fails and the
INVALID_RECORD error is returned.
+ log.warn("Failed to down-convert records for partition {},
sending an overflow batch instead", topicPartition());
Review Comment:
We create the rich message in `RecordSizeLimitExceededException`, but here
it is just dropped. It will cry, I bet. Maybe we could keep `e.getMessage()` at
least? Same for the warn in `KafkaApis`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]