[
https://issues.apache.org/jira/browse/KAFKA-19936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18041203#comment-18041203
]
Luke Chen commented on KAFKA-19936:
-----------------------------------
OK, thanks. I just want to confirm the definition of these 2 metrics. Does it
mean "the data enter the broker" or "the data enter the disk"? It looks like we
only count it when data enter the disk. So this issue is valid. Thank you.
> 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)