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

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

                Author: ASF GitHub Bot
            Created on: 16/Aug/24 16:14
            Start Date: 16/Aug/24 16:14
    Worklog Time Spent: 10m 
      Work Description: arjun4084346 commented on code in PR #4024:
URL: https://github.com/apache/gobblin/pull/4024#discussion_r1720048088


##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -146,15 +148,26 @@ protected void initializeMonitor() {
       throw new RuntimeException(String.format("Unable to retrieve dagActions 
from the dagActionStore while "
           + "initializing the %s", 
DagActionStoreChangeMonitor.class.getCanonicalName()), e);
     }
-    // TODO: make this multi-threaded to add parallelism
+    final ExecutorService executorService = 
Executors.newFixedThreadPool(ConfigUtils.getInt(this.config, 
ConfigurationKeys.DAG_ACTION_STORE_MONITOR_EXECUTOR_THREADS, 5));
+
     for (DagActionStore.DagAction action : dagActions) {
       try {
-        handleDagAction(action, true);
+        executorService.submit(()->handleDagAction(action, true));

Review Comment:
   `handleDagAction` throughs RuntimeException. `submit` will swallow it.
   You can use UncaughtExceptionHandler





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

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

> process all dag actions by multiple threads on initialization
> -------------------------------------------------------------
>
>                 Key: GOBBLIN-2131
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2131
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Aditya Pratap Singh
>            Priority: Minor
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> process all dag actions by multiple threads on initialization



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

Reply via email to