rodesai commented on a change in pull request #11149:
URL: https://github.com/apache/kafka/pull/11149#discussion_r688240994



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsProducer.java
##########
@@ -178,12 +180,39 @@ public void resetProducer() {
             throw new IllegalStateException("Expected eos-v2 to be enabled, 
but the processing mode was " + processingMode);
         }
 
+        final long start = Time.SYSTEM.nanoseconds();
         producer.close();
+        final long closeTime = Time.SYSTEM.nanoseconds() - start;
+
+        oldProducerTotalBlockedTime += closeTime + totalBlockedTime(producer);
 
         producer = clientSupplier.getProducer(eosV2ProducerConfigs);
         transactionInitialized = false;
     }
 
+    private static double getMetricValue(final Map<MetricName, ? extends 
Metric> metrics,
+                                         final String name) {
+        return metrics.keySet().stream()
+            .filter(n -> n.name().equals(name))
+            .findFirst()

Review comment:
       yeah it should always be one




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