TaiJuWu commented on code in PR #16167:
URL: https://github.com/apache/kafka/pull/16167#discussion_r1671257869


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogValidator.java:
##########
@@ -574,7 +574,7 @@ private static Optional<ApiRecordError> 
validateRecord(RecordBatch batch,
         if (batch.magic() <= RecordBatch.MAGIC_VALUE_V1 && 
batch.isCompressed()) {
             try {
                 record.ensureValid();
-            } catch (InvalidRecordException e) {
+            } catch (InvalidRecordException | CorruptRecordException e) {

Review Comment:
   
[here](https://github.com/apache/kafka/blob/80f31224aad543dbfc892bce1ad73b6bb693855a/clients/src/main/java/org/apache/kafka/common/record/LegacyRecord.java#L129)
 is the exception should be thrown so we need to add it.
   



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to