[ 
https://issues.apache.org/jira/browse/GOBBLIN-2194?focusedWorklogId=957079&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-957079
 ]

ASF GitHub Bot logged work on GOBBLIN-2194:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Feb/25 09:45
            Start Date: 14/Feb/25 09:45
    Worklog Time Spent: 10m 
      Work Description: abhishekmjain commented on code in PR #4097:
URL: https://github.com/apache/gobblin/pull/4097#discussion_r1955853183


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/joblauncher/GobblinTemporalJobScheduler.java:
##########
@@ -218,7 +218,11 @@ public void 
handleNewJobConfigArrival(NewJobConfigArrivalEvent newJobArrival) {
             throw new RuntimeException(e);
           }
         }));
-        launcher.launchJob(listener);
+        try {
+          launcher.launchJob(listener);
+        } finally {
+          launcher.close();

Review Comment:
   We could potentially call `metricsScope.close()` in `executeCancellation()` 
but that would not be a clean approach, since the parent object 
(GobblinTemporalJobLauncher) is not called with close but the child object 
(metricsScope) has been closed.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 957079)
    Time Spent: 1.5h  (was: 1h 20m)

> Fix Temporal metrics scope closure bug
> --------------------------------------
>
>                 Key: GOBBLIN-2194
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2194
>             Project: Apache Gobblin
>          Issue Type: Bug
>          Components: gobblin-metrics
>            Reporter: Abhishek Jain
>            Assignee: Issac Buenrostro
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> As part of https://issues.apache.org/jira/browse/GOBBLIN-2192 a bug was 
> introduced where the metrics scope object was not closed resulting in AM 
> container not shutting down.
> Metrics scope should be closed wherever initialized.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to