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

统一管理和调度各种后台任务 #511

Open
fx408 opened this issue Feb 29, 2024 · 3 comments
Open

统一管理和调度各种后台任务 #511

fx408 opened this issue Feb 29, 2024 · 3 comments
Labels
Discussion help wanted Extra attention is needed

Comments

@fx408
Copy link
Contributor

fx408 commented Feb 29, 2024

当前存在的后台任务包含: compaction,乱序合并,降采样,分级存储(开发中)

后台任务之间存在互斥关系,后台任务和 删除BD,删除表,shard过期等业务逻辑之间也存在互斥关系
由于后台任务缺乏有效的管理,导致互斥逻辑变得复杂且混乱

我们可能需要一个管理器,来统一调度各种后台任务,简化逻辑,降低代码复杂度

@localvar
Copy link
Contributor

localvar commented Mar 1, 2024

Thanks for taking my comments seriously, but I'm afraid I cann't give much help on these big topics as I have little knowledge about openGemini.

Per what I have found, I think many of the existing particular issues are related to concurrent programming, especially the usage of atomic functions, I would be glad to provide some help on this if required.

@xiangyu5632
Copy link
Member

这些前台和后台任务之间的互斥关系是怎样的?
我觉得可能需要先梳理清楚这个,然后这个管理调度器开放起来就不难了

@fx408
Copy link
Contributor Author

fx408 commented Mar 3, 2024

初步做了一些分析,任务管理调度器可能需要具备以下能力:

  1. 节点级总并发控制
  2. 不同的任务类型需要有独立的总并发控制:降采用和分级存储一般是老的shard,任务可以慢一些,要给compaction和merge留资源
  3. shard 粒度,调度器生命周期跟随 shard
  4. 表粒度调度控制能力:
    • 按任务优先级调度,高优先级任务进入时,终止低优先级任务运行,并暂停低优先级任务调度
    • 支持表粒度暂停、重启任务

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants