[
https://issues.apache.org/jira/browse/KAFKA-20585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081315#comment-18081315
]
Muralidhar Basani commented on KAFKA-20585:
-------------------------------------------
[~shivsundar] I see fetch latency metric is indeed recorded twice. In
handleShareFetchSuccess and handleShareAcknowledgeSuccess.
Opened a pr to fix that bug.
> Share Fetch latency metric incorrectly updated during ShareAcknowledgeResponse
> ------------------------------------------------------------------------------
>
> Key: KAFKA-20585
> URL: https://issues.apache.org/jira/browse/KAFKA-20585
> Project: Kafka
> Issue Type: Improvement
> Reporter: Shivsundar R
> Priority: Major
>
> The ShareFetchMetricsManager records latency metrics (share-fetch-latency,
> share-fetch-request-rate and share-fetch-request-total) at the response
> handlers in ShareConsumeRequestManager after the response is processed.
> There are a couple of issues here -
> 1. This one is a straightforward bug - we are currently recording these
> metrics both in the ShareFetch and ShareAcknowledge response handlers. We
> should ideally only record this for the ShareFetch responses.
> 2. The metrics are being recorded at the end of the response handler, so we
> would be missing to update the share-fetch-rate and share-fetch-total metrics
> for responses with top level errors. This is the same pattern in FetchManager
> as well where we are missing these responses with top level errors. Not sure
> if this was intended or we should account for these as well. [~lianetm] could
> you help take a look at the regular consumer/share-consumer and see what we
> should do here?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)