[ 
https://issues.apache.org/jira/browse/KAFKA-19936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18041202#comment-18041202
 ] 

PoAn Yang commented on KAFKA-19936:
-----------------------------------

For corrupted records, do you mean records which cannot pass validator and 
throw CorruptRecordException? These records doesn't contribute to metrics and 
will get into this catch.

[https://github.com/apache/kafka/blob/d27d90ccb3b2b98e02de42afd50910fbbbc162d0/core/src/main/scala/kafka/server/ReplicaManager.scala#L1445-L1455]

 

> ReplicaManager counts duplicated records to BytesInPerSec and 
> MessagesInPerSec metric
> -------------------------------------------------------------------------------------
>
>                 Key: KAFKA-19936
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19936
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: PoAn Yang
>            Assignee: PoAn Yang
>            Priority: Major
>
> For an idempotent producer, duplicated records are not written to disk; 
> however, they still contribute to the {{BytesInPerSec}} and 
> {{MessagesInPerSec}} metrics.
> 1. If the records are duplicated, UnifiedLog skips these messages.
> [https://github.com/apache/kafka/blob/d27d90ccb3b2b98e02de42afd50910fbbbc162d0/storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java#L1221-L1234]
> 2. ReplicaManager counts result from Partition#appendRecordsToLeader to 
> metrics.
> [https://github.com/apache/kafka/blob/d27d90ccb3b2b98e02de42afd50910fbbbc162d0/core/src/main/scala/kafka/server/ReplicaManager.scala#L1429-L1437]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to