jolshan commented on code in PR #13798:
URL: https://github.com/apache/kafka/pull/13798#discussion_r1224762118


##########
core/src/main/scala/kafka/network/RequestChannel.scala:
##########
@@ -240,16 +240,22 @@ object RequestChannel extends Logging {
       val responseSendTimeMs = nanosToMs(endTimeNanos - 
responseDequeueTimeNanos)
       val messageConversionsTimeMs = nanosToMs(messageConversionsTimeNanos)
       val totalTimeMs = nanosToMs(endTimeNanos - startTimeNanos)
-      val fetchMetricNames =
+      val prefixMetricNames =
         if (header.apiKey == ApiKeys.FETCH) {
           val isFromFollower = body[FetchRequest].isFromFollower
           Seq(
             if (isFromFollower) RequestMetrics.followFetchMetricName
             else RequestMetrics.consumerFetchMetricName
           )
+        } else if (header.apiKey == ApiKeys.ADD_PARTITIONS_TO_TXN) {
+          val request = body[AddPartitionsToTxnRequest]
+          if (request.version > 3 && 
request.data.transactions.asScala.filter(_.verifyOnly).size == 
request.data.transactions.size)
+            Seq(RequestMetrics.verifyPartitionsInTxnMetricName)
+          else
+            Seq.empty

Review Comment:
   I slightly have this off -- will fix



-- 
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

Reply via email to