Stephanie0002 commented on code in PR #8212:
URL: https://github.com/apache/rocketmq/pull/8212#discussion_r1618341430


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -519,6 +523,12 @@ private synchronized RemotingCommand 
updateAndCreateTopic(ChannelHandlerContext
         }
         long executionTime = System.currentTimeMillis() - startTime;
         LOGGER.info("executionTime of create topic:{} is {} ms" , topic, 
executionTime);
+        Attributes attributes = BrokerMetricsManager.newAttributesBuilder()
+                .put(LABEL_REQUEST_IS_SUCCESS, response.getCode() == 
ResponseCode.SUCCESS)

Review Comment:
   Yes, I overlooked the issue with the logical branches. The latest changes 
incorporate the metric recording logic into the finally block, ensuring it 
executes under all circumstances.



-- 
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: commits-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to