batmanneverdie opened a new issue, #14291:
URL: https://github.com/apache/dolphinscheduler/issues/14291

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar feature requirement.
   
   
   ### Description
   
   Adding `exclusive worker` field for default worker group in 
`t_ds_worker_group` table to exclude the specific worker.
   
   Why:
   in DS 3.1.3 version, all active workers will add to `default` worker group. 
But in same scenarios, like remote worker, it's a specific environment to run 
the specific tasks. The remote worker may not be suitable for all tasks, some 
dispatched tasks to the worker will cause error since environment issue.
   
   I think common users need not consider about choose which worker group when 
run tasks, if admin could exclusive some inapplicable worker for `default`, 
then all rest of worker in `default` worker group is usable. This will be nice 
for common user.
   
   
   在 DS 3.1.3 版本中,DS 会将所有存活的`workerNodeInfo`添加到`default`分组,这会导致一个问题:
   
   前提:remote worker 的环境是特殊的,只能执行特定的任务,而普通用户在配置任务时,不应该考虑选择什么 worker 
分组,应该无脑默认`default`即可。
   
   问题:`default`中包含的 remote worker 如果不被排除,则任务很可能会被调度到此 remote worker 
从而**导致任务因为环境问题失败**,这是很低级的问题。
   
   **解决方案:**
   
   在`t_ds_worker_group`表中添加`exclusive_worker`字段,**含义:被排除的 worker 地址,逗号分隔。**
   
   注意:仅`default`分组可以修改此字段,且`default`分组不可删除。
   
   **影响:**
   
   1. **新注册 worker 时(active worker)**
       
       检测 active worker 
是否在`exclusive_worker`中存在,存在则从default分组的`workerNodeInfo`排除,否则添加。
       
   2. **前端需要修改 worker 分组的编辑逻辑:**
   ![worker 
group](https://github.com/apache/dolphinscheduler/assets/41139080/edc47125-3d2d-4286-9f69-732d37704259)
   
   
   ### Use case
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a 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]

Reply via email to