Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance distributed task execution framework #46258

Closed
76 tasks done
ywqzzy opened this issue Aug 21, 2023 · 3 comments
Closed
76 tasks done

Enhance distributed task execution framework #46258

ywqzzy opened this issue Aug 21, 2023 · 3 comments
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@ywqzzy
Copy link
Contributor

ywqzzy commented Aug 21, 2023

Enhancement

We need to make Distributed task framework implementation more modular, reduce complexity of implement, decouple the implemented and future function. Moreover, the framework must be more robust and easy to use.

  1. By implementing a goroutine pool to control the concurrency of running tasks in the distributed framework, we can effectively prevent background tasks from consuming excessive compute resources and improve management scalability.
  2. Use one Dispatcher take care one task, simplify the complexity of Dispatcher management.
  3. The task status should follow the state machine, the whole procedure should be simple and easy to reasoning.
  4. When the Dispatcher is in error status and does not work, the impact scope can only be limited only to the task it takes care of. That means the dispatcher and scheduler's execution are decoupled. It will make the task run in distributed more robust.
  5. Consider error handling of the task, make the task can be more robust when encountering many abnormal scenes.
  6. Support cleanUp routines to do garbage collection for tasks.
  7. Support subtask history table to provide more management of the framework.
  8. Support metrics to maintain observability.
  9. Support role to make the node selection policy more flexible.
  10. Provide plan interface to make the whole execution process follow the plan, the business logic will be much clearer to trace and implement.
  11. Introduce operator abstraction to make it easier to compose functionalities and provide more sophisticated task runtime statistics collect logic. Further more, the cpu resource should be easy to manage.

Dispatcher

HA

Pause And Resume

CleanUp routine

Refinement

role

dynamic dispatch subtasks

Operator

Introduce operator

Integration

Planner

Introduce planner

Integration

  1. add index
  2. import into:
  1. global sort

SubTask runtime

metrics

  1. Support metric. disttask: add metrics collection for dispatcher and scheduler #47017

misc

bug fix

@ywqzzy ywqzzy added the type/enhancement The issue or PR belongs to an enhancement. label Aug 21, 2023
@tangenta tangenta changed the title Distributed task execution framework phase2 Enhance distributed task execution framework Aug 21, 2023
ti-chi-bot bot pushed a commit that referenced this issue Aug 22, 2023
@ywqzzy ywqzzy mentioned this issue Aug 24, 2023
12 tasks
ti-chi-bot bot pushed a commit that referenced this issue Aug 29, 2023
ti-chi-bot bot pushed a commit that referenced this issue Aug 31, 2023
ti-chi-bot bot pushed a commit that referenced this issue Sep 4, 2023
@ywqzzy ywqzzy mentioned this issue Oct 12, 2023
13 tasks
ti-chi-bot bot pushed a commit that referenced this issue Oct 14, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 16, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 27, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 30, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 31, 2023
ti-chi-bot bot pushed a commit that referenced this issue Nov 17, 2023
…untering network partition (#48660)

ref #46258, close pingcap/tidb#48649
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Nov 17, 2023
ti-chi-bot bot pushed a commit that referenced this issue Nov 17, 2023
…untering network partition (#48660) (#48688)

ref #46258, close pingcap/tidb#48649
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Dec 13, 2023

/close as all tasks completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

5 participants