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

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

                Author: ASF GitHub Bot
            Created on: 06/Dec/23 09:32
            Start Date: 06/Dec/23 09:32
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #3841:
URL: https://github.com/apache/gobblin/pull/3841#discussion_r1416986052


##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -313,10 +300,28 @@ protected void createMetrics() {
     this.nullDagActionTypeMessagesMeter = 
this.getMetricContext().contextAwareMeter(RuntimeMetrics.GOBBLIN_DAG_ACTION_STORE_MONITOR_NULL_DAG_ACTION_TYPE_MESSAGES);
     this.produceToConsumeDelayMillis = 
this.getMetricContext().newContextAwareGauge(RuntimeMetrics.GOBBLIN_DAG_ACTION_STORE_PRODUCE_TO_CONSUME_DELAY_MILLIS,
 () -> produceToConsumeDelayValue);
     this.getMetricContext().register(this.produceToConsumeDelayMillis);
+
+    // Setup proxy for launch submission metrics
+    this.ON_STARTUP = new 
LaunchSubmissionMetricProxy(this.successfulLaunchSubmissionsOnStartup, 
this.failedLaunchSubmissionsOnStartup);
+    this.POST_STARTUP = new 
LaunchSubmissionMetricProxy(this.successfulLaunchSubmissions, 
this.failedLaunchSubmissions);

Review Comment:
   putting the initialization here means NPE during any invocation of 
`submitFlowToDagManagerHelper` that may come prior.
   
   if you can't rework, I suggest at first to temporarily initialize these 
according to the Null Pattern:
   ```
   LaunchSubmissionMetricProxy ON_STARTUP = new LaunchSubmissionMetricProxy {
     @Override public void markSuccess() { }
     @Override public void markFailure() { }
   }
   ```





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

    Worklog Id:     (was: 894261)
    Time Spent: 2.5h  (was: 2h 20m)

> Consolidate Processing Dag Actions to Single Code Path
> ------------------------------------------------------
>
>                 Key: GOBBLIN-1970
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1970
>             Project: Apache Gobblin
>          Issue Type: Improvement
>          Components: gobblin-service
>            Reporter: Urmi Mustafi
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> We have similar code in the DagActionStoreChangeMonitor and DagManager to 
> process dag actions from the DagActionStore. There have been small 
> discrepancies between the code in each area leading to unexpected bugs in how 
> the actions are processed, so to fix forward and make this easier to maintain 
> with code in one place we consolidate all logic relating to the dag action 
> processing to the DagActionStoreChangeMonitor. The processing in the change 
> monitor is working correctly, while the handling of launch events in the 
> DagManager is failing compilation most likely due to an error loading the job 
> templates when initializing the compiler but we're not able to identify the 
> exact issue. 



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

Reply via email to