KAFKA-17104: fix InvalidMessageCrcRecordsPerSec is not updated in validating Legac…#16558
KAFKA-17104: fix InvalidMessageCrcRecordsPerSec is not updated in validating Legac…#16558chia7712 merged 7 commits intoapache:trunkfrom
Conversation
Done. Thanks for your check. |
|
@TaiJuWu please rebase code to trigger QA again |
Hi @chia7712 , It seems not CI issue because it appear two times. Or addess this in #16167 ? |
not really. The deadlock is caused by |
OK. Thanks your review and information. |
| if (batch.magic() <= RecordBatch.MAGIC_VALUE_V1 && batch.isCompressed()) { | ||
| try { | ||
| record.ensureValid(); | ||
| } catch (InvalidRecordException e) { |
There was a problem hiding this comment.
In order to keep consistency, we should rethrow CorruptRecordException here. for example:
} catch (CorruptRecordException e) {
metricsRecorder.recordInvalidChecksums();
throw e;
} catch (InvalidRecordException e) {
metricsRecorder.recordInvalidChecksums();
throw new CorruptRecordException(e.getMessage() + " in topic partition " + topicPartition);
}There was a problem hiding this comment.
Done. Thanks for this suggestion.
…ng LegacyRecord (apache#16558) Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
…yRecord
*More detailed description of your change,
*Summary of testing strategy (including rationale)
Uint test
Committer Checklist (excluded from commit message)