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

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

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


##########
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:
   the other alternative is to use the Null/NoOp Pattern in the call site, e.g.:
   ```
   protected void submitFlow(DagAction dagAction, boolean isStartup) {
     submitFlow(dagAction, (isStartup ? ON_STARTUP : POST_STARTUP).orElse(new 
LaunchSubmissionMetricProxy { /* as in above comment */}));
   }
   ```
   i.e. make these two `volatile Optional<LSMP>`





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

    Worklog Id:     (was: 894354)
    Time Spent: 2h 50m  (was: 2h 40m)

> 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: 2h 50m
>  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