-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
Signed-off-by: Connor1996 <[email protected]>
Signed-off-by: Connor1996 <[email protected]>
reference/titan/design.md
Outdated
@@ -0,0 +1,111 @@ | |||
# Titan 设计文档 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请确认是否需要在官网展示设计文档。一般官网文档只展示用户文档。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
稍微精简下了这个文档,让它更符合简介文档的定位
@Connor1996 Please also involve a technical review, thanks! |
Signed-off-by: Connor1996 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
reference/titan/overview.md
Outdated
|
||
### 传统 GC | ||
|
||
在设计 GC 的时候有两个主要的问题需要考虑: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Connor1996 @yiwu-arbug 是否是从开发者设计的角度介绍 Titan 的设计思路和实现细节,个人觉得对于用户文档来说太详细和复杂了,用户是否真的需要去了解开发者是如何去设计的以及内部的各种实现机制呢?建议这些内容在博客中展示。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kissmydb PTAL
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
Co-Authored-By: TomShawn <[email protected]>
reference/titan/overview.md
Outdated
|
||
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 |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
cherry pick to release-4.0 in PR #3045 |
Co-authored-by: Connor <[email protected]>
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! |
Signed-off-by: Connor1996 [email protected]
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
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)?