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

reference/titan: add titan docs #2494

Merged
merged 49 commits into from
May 12, 2020
Merged

reference/titan: add titan docs #2494

merged 49 commits into from
May 12, 2020

Conversation

Connor1996
Copy link
Member

Signed-off-by: Connor1996 [email protected]

What is changed, added or deleted? (Required)

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

  • master (the latest development version, including v4.0 changes for now)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

If you select two or more versions from above, to trigger the bot to cherry-pick this PR to your desired release version branch(es), you must add corresponding labels such as needs-cherry-pick-3.1, needs-cherry-pick-3.0, and needs-cherry-pick-2.1.

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

  • This PR is translated from:
  • Other reference link(s):

Signed-off-by: Connor1996 <[email protected]>
Signed-off-by: Connor1996 <[email protected]>
@TomShawn TomShawn added size/large Changes of a large size. translation/doing This PR’s assignee is translating this PR. v4.0 This PR/issue applies to TiDB v4.0. labels Mar 18, 2020
@@ -0,0 +1,111 @@
# Titan 设计文档
Copy link
Contributor

@TomShawn TomShawn Mar 18, 2020

Choose a reason for hiding this comment

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

请确认是否需要在官网展示设计文档。一般官网文档只展示用户文档。

Copy link
Member Author

Choose a reason for hiding this comment

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

稍微精简下了这个文档,让它更符合简介文档的定位

reference/titan/configuration.md Show resolved Hide resolved
@TomShawn TomShawn changed the title Add titan docs reference/titan: add titan docs Mar 18, 2020
reference/titan/design.md Outdated Show resolved Hide resolved
reference/titan/design.md Outdated Show resolved Hide resolved
reference/titan/design.md Outdated Show resolved Hide resolved
reference/titan/design.md Outdated Show resolved Hide resolved
reference/titan/design.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Show resolved Hide resolved
@TomShawn
Copy link
Contributor

TomShawn commented Mar 18, 2020

@Connor1996 Please also involve a technical review, thanks!

@Connor1996 Connor1996 requested a review from yiwu-arbug March 20, 2020 08:30
Signed-off-by: Connor1996 <[email protected]>
@Connor1996
Copy link
Member Author

Thanks for your review! Comments are addressed @lilin90 @TomShawn

Copy link
Contributor

@yiwu-arbug yiwu-arbug left a comment

Choose a reason for hiding this comment

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

LGTM

reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Show resolved Hide resolved
reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/configuration.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved

### 传统 GC

在设计 GC 的时候有两个主要的问题需要考虑:
Copy link
Contributor

@TomShawn TomShawn Mar 26, 2020

Choose a reason for hiding this comment

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

@Connor1996 @yiwu-arbug 是否是从开发者设计的角度介绍 Titan 的设计思路和实现细节,个人觉得对于用户文档来说太详细和复杂了,用户是否真的需要去了解开发者是如何去设计的以及内部的各种实现机制呢?建议这些内容在博客中展示。

Copy link
Contributor

Choose a reason for hiding this comment

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

@kissmydb PTAL


GC 的方式就是对于这些选中的 BlobFile 文件,依次通过查询其中每个 value 相应的 key 的 blob index 是否存在或者更新来确定该 value 是否作废,最终将未作废的 value 归并排序生成新的 BlobFile,并将这些 value 更新后的 blob index 通过 WriteCallback 或者 MergeOperator 的方式写回到 SST 中。在完成 GC 后,这些原来的 BlobFile 文件并不会立即被删除,Titan 会在写回 blob index 后记录 RocksDB 最新的 sequence number,等到最旧 snapshot 的 sequence 超过这个记录的 sequence number 时 BlobFile 才能被删除。这个是因为在写回 blob index 后,还是可能通过之前的 snapshot 访问到老的 blob index,因此需要确保没有 snapshot 会访问到这个老的 blob index 后才能安全删除相应 BlobFile。

### Level-Merge
Copy link
Contributor

Choose a reason for hiding this comment

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

@Connor1996 Please confirm and unify Level-Merge or Level Merge.

reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
reference/titan/overview.md Outdated Show resolved Hide resolved
Copy link
Contributor

@TomShawn TomShawn left a comment

Choose a reason for hiding this comment

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

LGTM

@TomShawn TomShawn removed status/require-change Needs the author to address comments. v4.0 This PR/issue applies to TiDB v4.0. labels May 12, 2020
@TomShawn TomShawn self-assigned this May 12, 2020
@TomShawn
Copy link
Contributor

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 12, 2020
@sre-bot
Copy link
Contributor

sre-bot commented May 12, 2020

/run-all-tests

@sre-bot sre-bot merged commit 246ab95 into pingcap:master May 12, 2020
sre-bot pushed a commit to sre-bot/docs-cn that referenced this pull request May 12, 2020
@sre-bot
Copy link
Contributor

sre-bot commented May 12, 2020

cherry pick to release-4.0 in PR #3045

TomShawn pushed a commit that referenced this pull request May 12, 2020
rleungx pushed a commit to rleungx/docs-cn that referenced this pull request May 22, 2020
@yikeke
Copy link
Contributor

yikeke commented Jul 28, 2020

NOTE: Please also align titan-configuration.md → storage-engine/titan-configuration.md AND titan-configuration.md → storage-engine/titan-configuration.md in https://github.com/pingcap/docs-cn/pull/3574/files. @TomShawn

@TomShawn
Copy link
Contributor

NOTE: Please also align titan-configuration.md → storage-engine/titan-configuration.md AND titan-configuration.md → storage-engine/titan-configuration.md in https://github.com/pingcap/docs-cn/pull/3574/files. @TomShawn

Get it. Thanks!

@TomShawn TomShawn added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Sep 3, 2020
@TomShawn TomShawn mentioned this pull request Sep 3, 2020
9 tasks
@lilin90 lilin90 mentioned this pull request Sep 16, 2020
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/large Changes of a large size. status/can-merge Indicates a PR has been approved by a committer. 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.

8 participants