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

*: add docs for TiFlash MinTSO scheduler #18621

Merged
merged 21 commits into from
Nov 4, 2024
Merged

Conversation

windtalker
Copy link
Contributor

@windtalker windtalker commented Sep 12, 2024

First-time contributors' checklist

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions))

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 12, 2024
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
@lilin90 lilin90 self-assigned this Oct 22, 2024
@lilin90 lilin90 added the translation/doing This PR’s assignee is translating this PR. label Oct 22, 2024
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Oct 22, 2024
@lilin90 lilin90 added needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.2 Should cherry pick this PR to release-8.2 branch. needs-cherry-pick-release-8.3 Should cherry pick this PR to release-8.3 branch. labels Oct 22, 2024
@lilin90 lilin90 self-requested a review October 22, 2024 07:19
@lilin90 lilin90 added the needs-cherry-pick-release-8.4 Should cherry pick this PR to release-8.4 branch. label Oct 25, 2024
TOC.md Show resolved Hide resolved
summary: 介绍 TiFlash MinTSO 调度器。
---

# TiFlash MinTSO Scheduler
Copy link
Member

@lilin90 lilin90 Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果没有其它考量,标题可否直接用“TiFlash MinTSO 调度器”?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以的


# TiFlash MinTSO Scheduler

本文介绍 TiFlash MinTSO scheduler 的原理与实现。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议先用一句话描述下 TiFlash MinTSO 调度器是什么,然后再接“本文介绍”句话。

tiflash/tiflash-mintso-scheduler.md Outdated Show resolved Hide resolved
tiflash/tiflash-mintso-scheduler.md Outdated Show resolved Hide resolved
tiflash/tiflash-mintso-scheduler.md Outdated Show resolved Hide resolved
tiflash/tiflash-mintso-scheduler.md Outdated Show resolved Hide resolved
tiflash/tiflash-mintso-scheduler.md Outdated Show resolved Hide resolved

MinTSO Scheduler 的目标就是在控制系统线程数的同时,确保系统中始终有且只有一个特殊的 query,其所有的 MPPTask 都可以被调度到。 MinTSO Scheduler 是一个完全分布式的调度器,每个 TiFlash 仅根据自身信息对 MPPTask 进行调度,因此,所有 TiFlash 的 MinTSO Scheduler 需要找到同一个“特殊”的 query。在 TiDB 中,每个 query 都会带有一个读的时间戳(TiDB 中称之为 start_ts),MinTSO Scheduler 定义“特殊” query 的标准即为当前 TiFlash 节点上 start_ts 最小的 query,根据全局最小一定是局部最小的原理,所有的 TiFlash 选出的“特殊” query 必然是同一个。我们称之为 MinTSO query。MinTSO scheduler 的调度流程如下:

<img src="/media/tiflash/tiflash_mintso_v2.png" width=50%></img>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<img src="/media/tiflash/tiflash_mintso_v2.png" width=50%></img>
![TiFlash MinTSO Scheduler v2](/media/tiflash/tiflash_mintso_v2.png)

tiflash/tiflash-mintso-scheduler.md Outdated Show resolved Hide resolved
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #18990.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.2: #18991.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.3: #18992.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.4: #18993.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.1: #18994.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #18995.

@lilin90 lilin90 mentioned this pull request Nov 4, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.2 Should cherry pick this PR to release-8.2 branch. needs-cherry-pick-release-8.3 Should cherry pick this PR to release-8.3 branch. needs-cherry-pick-release-8.4 Should cherry pick this PR to release-8.4 branch. ONCALL Relates to documentation oncall. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants