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

*: make pd module more independent #5189

Merged
merged 3 commits into from Aug 5, 2019

Conversation

@siddontang
Copy link
Contributor

commented Aug 4, 2019

Signed-off-by: siddontang siddontang@gmail.com

What have you changed? (mandatory)

This PR tries to refactor PD module so we can move it to the independent crate later. Now, we do the following changes:

  1. Let Coprocessor and Storage modules don't depend on PD module (IMO, they should not know PD), the two modules only send read flow statistics to PD, so we can extract this to a trait to decouple PD dependency.
  2. Let PD module not depend on raftstore module, the PD module is a base module that the raftstore should depend on it, not reverse. So we move PD task and runner to raftstore worker directly because only raftstore needs these.

Doing this can reduce the compiling time, in my local test with make unportable_release, the partial compiling time reduced from 10m12s to 9m27s.

TODO:

  1. Move PD module to the independent crate in components.

What are the type of the changes? (mandatory)

  • Engineering (engineering change which doesn't change any feature or fix any issue)

How has this PR been tested? (mandatory)

Passing CI is fine.

Does this PR affect documentation (docs) or release note? (mandatory)

No

Does this PR affect tidb-ansible update? (mandatory)

No

siddontang added some commits Aug 4, 2019

*: make pd module more independent
Signed-off-by: siddontang <siddontang@gmail.com>
*: remove stale comments code
Signed-off-by: siddontang <siddontang@gmail.com>
Merge branch 'master' into siddontang/pd-refactor
Signed-off-by: siddontang <siddontang@gmail.com>
@sre-bot

This comment has been minimized.

Copy link
Collaborator

commented Aug 5, 2019

/run-all-tests

@sre-bot sre-bot merged commit 995257d into tikv:master Aug 5, 2019

5 checks passed

DCO All commits are signed off!
Details
idc-jenkins-ci-tikv/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci/test Jenkins job succeeded.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.