dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

A duplicate key property error occurs when defining two tasks with the same OUT parameter name in a process

Open fanzhenyu95 opened this issue 1 year ago • 2 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

I have defined a workflow that includes two tasks of the stored procedure type, each with an OUT parameter named "result". When executed, a duplicate key property error occurs.

7ef326ba1eac5ea8bc720293654e1e7

I have reviewed the source code, and the error is caused by the following line of code:

a835a46bc951e95c210461deef0ebb6

I suspect that this error is related to the up and downstream parameter passing function. How can I resolve this issue?

What you expected to happen

How can this error be avoided? Or, how can we support the scenario where the upstream and downstream stored procedure type tasks in a workflow have OUT parameters with the same name?

How to reproduce

Define a workflow that includes more than two tasks of the stored procedure type, each containing an OUT parameter with the same name, and then execute this workflow.

Anything else

No response

Version

dev

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

fanzhenyu95 avatar Jul 28 '24 04:07 fanzhenyu95

If the parameter with the same name should be overridden, the parameter generated by the node with the latest downstream or end time shall prevail

wangxj3 avatar Aug 06 '24 00:08 wangxj3

Thank you for your replies to my questions.

The Procedure Task did not call the dealOutParam method in AbstractParameters class. If I am using version 3.2.1 of DolphinScheduler, should I fix this issue by following this PR(#16420) in the dealOutParam4Procedure method of ProcedureParameters class?

fanzhenyu95 avatar Aug 13 '24 03:08 fanzhenyu95