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

understanding-tidb: Introduction of TiDB architecture #24

Merged
merged 3 commits into from
Jul 2, 2021

Conversation

tisonkun
Copy link
Contributor

Signed-off-by: tison wander4096@gmail.com

What issue does this PR solve?

What is changed:

Write down the first version of Introduction of TiDB architecture, making use of https://pingcap.com/blog-cn/tidb-source-code-reading-2/

@tisonkun tisonkun requested a review from zz-jason June 11, 2021 07:49
@dragonly
Copy link

I suggest changing "you" to "we", which reads much warm and comfortable for me :D

@tisonkun
Copy link
Contributor Author

I suggest changing "you" to "we", which reads much warm and comfortable for me :D

Thanks for your review. Could you add suggestions or send a pull request to this branch?

@tisonkun
Copy link
Contributor Author

I suggest changing "you" to "we", which reads much warm and comfortable for me :D

With a walkthrough I think keep using "you" to talk with the reader is smoothly. They are not "we" because they have their own opinion.

@tisonkun
Copy link
Contributor Author

cc @djshow832 @zimulala PTAL


TiDB has a number of modules. Table below is an overview that shows what each module does, and if you want to see the code for the relevant function, you can find the corresponding module directly.

| Package | Introduction |

Choose a reason for hiding this comment

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

There is a big change to the packages, especially for the cmd and util directories. util has nearly 50 packages, which is almost impossible to maintain. Maybe we don't need to list all the packages, or just give an outline of cmd and util?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense. I will remove some of sub packages in this run. But maybe we'd better structure our codebase to be clear to express.


### SQL Layer Architecture

![sql-layer-architecture](https://user-images.githubusercontent.com/18818196/121646008-6e22a900-cac7-11eb-954a-fbca825855b0.png)

Choose a reason for hiding this comment

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

It's a little out of date. E.g. the storage engine can be TiFlash, and there are more background workers now. But I think it's basically fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@djshow832 ok. Would you mind to draw a picture (maybe by hands) or describe the architecture in the corresponding issue #23 or creating a new issue so that we can update it later?

Choose a reason for hiding this comment

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

Creating an issue sounds fine to me. I'll do it.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Contributor Author

tisonkun commented Jul 1, 2021

Updated the content, please take a look @djshow832 @zz-jason .

Although I think the package structure of "util" should be refactor to be clear to express but let's describe the current stat for now.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@tisonkun tisonkun merged commit e288178 into pingcap:master Jul 2, 2021
@tisonkun tisonkun deleted the intro-tidb-arch branch July 2, 2021 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write down the first version of Introduction of TiDB architecture
4 participants