SbloodyS commented on code in PR #17955:
URL: 
https://github.com/apache/dolphinscheduler/pull/17955#discussion_r2771865336


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/command/handler/AbstractCommandHandler.java:
##########
@@ -125,8 +126,31 @@ protected void assembleWorkflowGraph(
     protected abstract void assembleWorkflowInstance(
                                                      final 
WorkflowExecuteContextBuilder workflowExecuteContextBuilder);
 
-    protected abstract void assembleWorkflowExecutionGraph(
-                                                           final 
WorkflowExecuteContextBuilder workflowExecuteContextBuilder);
+    /**
+     * Assemble the workflow execution graph assembler.
+     * <p>
+     * The assembler is used to defer the initialization of the 
WorkflowExecutionGraph
+     * until the WorkflowStartLifecycleEvent is fired. This reduces 
transaction time
+     * during command processing.
+     */
+    protected void assembleWorkflowExecutionGraphAssembler(
+                                                           final 
WorkflowExecuteContextBuilder workflowExecuteContextBuilder) {
+        final IWorkflowExecutionGraphAssembler assembler = 
createWorkflowExecutionGraphAssembler(
+                workflowExecuteContextBuilder);
+        
workflowExecuteContextBuilder.setWorkflowExecutionGraphAssembler(assembler);
+    }
+
+    /**
+     * Create the workflow execution graph assembler.
+     * <p>
+     * Subclasses should implement this method to provide the logic for 
building
+     * the WorkflowExecutionGraph. The returned assembler will be invoked when
+     * the WorkflowStartLifecycleEvent is fired.
+     *
+     * @return the assembler for creating the WorkflowExecutionGraph, or null 
if no graph is needed
+     */
+    protected abstract IWorkflowExecutionGraphAssembler 
createWorkflowExecutionGraphAssembler(
+                                                                               
               final WorkflowExecuteContextBuilder 
workflowExecuteContextBuilder);

Review Comment:
   Please avoid all this unnessnary changes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to