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

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

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


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/cluster/GobblinTemporalTaskRunner.java:
##########
@@ -292,6 +293,12 @@ public synchronized void stop() {
       this.containerMetrics.get().stopMetricsReporting();
     }
 
+    try {
+      this.workflowServiceStubs.getOptions().getMetricsScope().close();

Review Comment:
   It is because the metrics scope object has to be created separately and 
passed to workflowServiceStubs. [See 
here](https://github.com/apache/gobblin/blob/adef734100aa3eb076a0aeea8d202c4131543d02/gobblin-temporal/src/main/java/org/apache/gobblin/temporal/workflows/client/TemporalWorkflowClientFactory.java#L111-L114)
   If metrics scope is shared and one of the consumer closes it, it would be 
closed for all other consumers.
   
   FYI This is temporal code, I am just guessing what could be the reason of 
not closing it.





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

    Worklog Id:     (was: 957081)
    Time Spent: 1h 40m  (was: 1.5h)

> 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: 1h 40m
>  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