abhishekmjain commented on code in PR #4173:
URL: https://github.com/apache/gobblin/pull/4173#discussion_r2915747074


##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinTaskRunner.java:
##########
@@ -415,22 +420,42 @@ public synchronized void stop() {
 
     logger.info("Stopping the Gobblin Task runner");
 
-    // Stop metric reporting
-    if (this.containerMetrics.isPresent()) {
-      this.containerMetrics.get().stopMetricsReporting();
-    }
-
     try {
       stopServices();
     } finally {
       logger.info("All services are stopped.");
-      this.taskStateModelFactory.shutdown();
+      shutdownTaskStateModelFactory();
       disconnectHelixManager();
     }
 
+    // Stop metric reporting only after tasks have completed and emitted their 
final GTEs
+    if (this.containerMetrics.isPresent()) {
+      this.containerMetrics.get().stopMetricsReporting();
+    }
+
     this.isStopped = true;

Review Comment:
   this is a nice catch, I believe we should implement it



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