ruanwenjun commented on code in PR #13183:
URL: 
https://github.com/apache/dolphinscheduler/pull/13183#discussion_r1047946161


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/TaskMetrics.java:
##########
@@ -83,11 +85,31 @@ public void incTaskDispatch() {
         taskDispatchCounter.increment();
     }
 
-    public void incTaskInstanceByState(final String state) {
-        if (taskInstanceCounters.get(state) == null) {
+    public void incTaskInstanceByState(final String state, Integer 
taskInstanceId) {

Review Comment:
   ```suggestion
       public void incTaskInstanceByState(final String state, String 
taskInstanceName) {
   ```



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/TaskMetrics.java:
##########
@@ -83,11 +85,31 @@ public void incTaskDispatch() {
         taskDispatchCounter.increment();
     }
 
-    public void incTaskInstanceByState(final String state) {
-        if (taskInstanceCounters.get(state) == null) {
+    public void incTaskInstanceByState(final String state, Integer 
taskInstanceId) {

Review Comment:
   Please don't query the database again.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to