PoAn Yang created KAFKA-19936:
---------------------------------
Summary: 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
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)