github-actions[bot] commented on issue #17613: URL: https://github.com/apache/dolphinscheduler/issues/17613#issuecomment-3465803242
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened In DolphinScheduler 3.3.1, when setting the task group priority within a workflow definition, the configuration is saved correctly in the UI. However, after execution, all task group queue priorities become 0, regardless of the configured values. In DolphinScheduler version 3.3.1, when setting the intra-group priority for a task in the workflow definition, the configuration on the interface is saved normally, but after running, it is found that the queue priority of the task group is always 0, which is inconsistent with the configured priority. ### What you expected to happen Each task in the workflow should retain and reflect its configured task group priority value during execution, which should affect the scheduling order within the task group queue. It is expected that when the workflow is running, each task can correctly inherit and reflect its configured group priority value, thereby correctly reflecting the scheduling priority order in the task group queue. ### How to reproduce 1. Create a new workflow definition. 2. Add multiple tasks to the workflow. 3. Set different task group priorities for each task (e.g., 5, 10, 15). 4. Save and run the workflow definition. 5. Navigate to Resource Center → Task Group Management → Task Group Queue, and check the Group Priority column — all tasks show priority = 0, regardless of the configured values. 1. Create a new workflow definition. 2. Add multiple tasks. 3. Set different intra-group priorities (such as 5, 10, 15) for each task. 4. Save and run the workflow definition. 5. Check the Priority column in the group in Resource Center → Task Group Management → Task Group Queue. You can see that the priority of all tasks is 0 and does not take effect as configured. <img width="1042" height="320" alt="Image" src="https://github.com/user-attachments/assets/9e29a5f4-37c4-48af-ad58-5beca6c77871" /> ### Anything else After checking the source code, the issue is caused by the method `org.apache.dolphinscheduler.server.master.engine.task.runnable.AbstractTaskInstanceFactory#injectMetadataFromTaskDefinition` not passing t`askDefinition.taskGroupPriority `to `taskInstance.taskGroupPriority.` I have fixed this issue locally, and after the modification, the queue priority correctly reflects the configured value. I am willing to submit a Pull Request if needed. By looking at the source code, we found that the cause of the problem is: `org.apache.dolphinscheduler.server.master.engine.task.runnable.AbstractTaskInstanceFactory#injectMetadataFromTaskDefinition` `taskDefinition.taskGroupPriority` is not passed to `taskInstance.taskGroupPriority` in . I have fixed the issue locally so that the task group queue priority correctly reflects the configured value. I'm willing to submit a Pull Request if needed. <img width="1433" height="740" alt="Image" src="https://github.com/user-attachments/assets/fe48c27a-d60b-4432-ab0f-523b177c36db" /> ### Version dev ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
