Skip to content

[Bug] [master] Task group queue priority always remains 0 in DolphinScheduler 3.3.1 #17613

@KwongHing

Description

@KwongHing

Search before asking

  • I had searched in the issues 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.

在 DolphinScheduler 3.3.1 版本中,当在工作流定义中为任务设置 组内优先级 时,界面上配置保存是正常的,但运行后发现任务组的 队列优先级始终为 0,与配置的优先级不一致。

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.

期望在工作流运行时,每个任务能正确继承并体现其配置的 组内优先级 值,从而在任务组队列中正确体现调度优先级顺序。

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. 新建一个 工作流定义。
  2. 添加多个任务。
  3. 分别为每个任务设置不同的 组内优先级(如 5、10、15)。
  4. 保存并运行该工作流定义。
  5. 在 资源中心 → 任务组管理 → 任务组队列 中查看 组内优先级 一栏,可以看到所有任务的优先级都为 0,并未按配置生效。
Image

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 taskDefinition.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.

通过查看源码发现,问题的原因在于:
org.apache.dolphinscheduler.server.master.engine.task.runnable.AbstractTaskInstanceFactory#injectMetadataFromTaskDefinition
中未将 taskDefinition.taskGroupPriority 传递给 taskInstance.taskGroupPriority

我已在本地修复该问题,修复后任务组队列优先级能正确反映配置的值。如有需要,我愿意提交 Pull Request。

Image

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

backendbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions