cmccabe commented on a change in pull request #8863:
URL: https://github.com/apache/kafka/pull/8863#discussion_r450504757



##########
File path: 
tools/src/main/java/org/apache/kafka/trogdor/coordinator/TaskManager.java
##########
@@ -395,11 +401,13 @@ public Void call() throws Exception {
                 log.error("Unable to find nodes for task {}", task.id, e);
                 task.doneMs = time.milliseconds();
                 task.state = TaskStateType.DONE;
+                trogdorMetrics.recordDoneTask();

Review comment:
       It would be better to create a method in ManagedTask like 
`setState(...)` and increment the appropriate metric if the state had changed.  
Then we could move all these `state = foo` lines over to using that API.  This 
would prevent making a mistake here.




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

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


Reply via email to