zhang-arvin commented on PR #18575:
URL:
https://github.com/apache/dolphinscheduler/pull/18575#issuecomment-5469064533
@SbloodyS Thanks for the detailed explanation! You are right —
`commandParam` only contains startup parameters, not runtime OUT parameters. I
have changed the fix:
Instead of removing VarPool entirely, the code now uses
`taskExecutionContext.getVarPool()` which is populated by
`TaskExecutionContextFactory.generateTaskInstanceVarPool()`. This method
computes the predecessor-scoped VarPool — it only includes OUT parameters from
direct upstream tasks, not sibling branches. This preserves legitimate upstream
OUT parameters while preventing sibling branch pollution.
The key change in `SubWorkflowLogicTask.triggerNewSubWorkflow()`:
```java
final List<Property> paramList = mergeParams(asList(
new ArrayList<>(deserializeVarPool(workflowInstance.getGlobalParams())),
commandParam.getCommandParams(),
taskExecutionContext.getVarPool())); // predecessor-scoped VarPool
```
Please take another look when you have a chance.
--
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]