tinaselenge commented on code in PR #14375: URL: https://github.com/apache/kafka/pull/14375#discussion_r1428032730
########## core/src/main/java/kafka/server/ReplicaFetcherTierStateMachine.java: ########## @@ -229,6 +229,9 @@ private Long buildRemoteLogAuxState(TopicPartition topicPartition, Partition partition = replicaMgr.getPartitionOrException(topicPartition); partition.truncateFullyAndStartAt(nextOffset, false, Option.apply(leaderLogStartOffset)); + replicaMgr.brokerTopicStats().topicStats(topicPartition.topic()).buildRemoteLogAuxStateRequestRate().mark(); + replicaMgr.brokerTopicStats().allTopicsStats().buildRemoteLogAuxStateRequestRate().mark(); + Review Comment: The original reason was not to emit the error metrics, when buildRemoteLogAuxState fails because of the remote log storage not being enabled. However, thinking about this again, this makes more sense. We will always emit request metrics when we attempt to build log aux, and emit error metrics when there is an exception. I made the suggested change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org