You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2018/12/06 13:51:00 UTC

[jira] [Resolved] (KAFKA-7704) kafka.server.ReplicaFetechManager.MaxLag.Replica metric is reported incorrectly

     [ https://issues.apache.org/jira/browse/KAFKA-7704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao resolved KAFKA-7704.
----------------------------
       Resolution: Fixed
    Fix Version/s: 2.1.1
                   2.2.0

Merged to trunk and 2.1.

> kafka.server.ReplicaFetechManager.MaxLag.Replica metric is reported incorrectly
> -------------------------------------------------------------------------------
>
>                 Key: KAFKA-7704
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7704
>             Project: Kafka
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 2.1.0
>            Reporter: Yu Yang
>            Assignee: huxihx
>            Priority: Major
>             Fix For: 2.2.0, 2.1.1
>
>         Attachments: Screen Shot 2018-12-03 at 4.33.35 PM.png, Screen Shot 2018-12-05 at 10.13.09 PM.png
>
>
> We recently deployed kafka 2.1, and noticed a jump in kafka.server.ReplicaFetcherManager.MaxLag.Replica metric. At the same time, there is no under-replicated partitions for the cluster. 
> The initial analysis shows that kafka 2.1.0 does not report metric correctly for topics that have no incoming traffic right now, but had traffic earlier. For those topics, ReplicaFetcherManager will consider the maxLag be the latest offset. 
> For instance, we have a topic named `test_topic`: 
> {code}
> [root@kafkabroker03002:/mnt/kafka/test_topic-0]# ls -l
> total 8
> -rw-rw-r-- 1 kafka kafka 10485760 Dec  4 00:13 00000000099043947579.index
> -rw-rw-r-- 1 kafka kafka        0 Sep 23 03:01 00000000099043947579.log
> -rw-rw-r-- 1 kafka kafka       10 Dec  4 00:13 00000000099043947579.snapshot
> -rw-rw-r-- 1 kafka kafka 10485756 Dec  4 00:13 00000000099043947579.timeindex
> -rw-rw-r-- 1 kafka kafka        4 Dec  4 00:13 leader-epoch-checkpoint
> {code}
> kafka reports ReplicaFetcherManager.MaxLag.Replica be 99043947579
>  !Screen Shot 2018-12-03 at 4.33.35 PM.png|width=720px! 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)