Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

move pd scheduler to separated pkg #532

Merged
merged 12 commits into from
Sep 28, 2020
Merged

move pd scheduler to separated pkg #532

merged 12 commits into from
Sep 28, 2020

Conversation

glorv
Copy link
Collaborator

@glorv glorv commented Sep 25, 2020

What problem does this PR solve?

Move pd scheduler relates functions from Mgr to a separated public struct so that we can reuse these logic in lightning and other project.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change

Side effects

Related changes

Release Note

@glorv glorv force-pushed the pd-mgr branch 2 times, most recently from 11fe61a to c0be41e Compare September 25, 2020 11:34
Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

Rest LGTM

pkg/conn/pd.go Outdated Show resolved Hide resolved
@glorv glorv changed the title move pd scheduler to separate struct move pd scheduler to separate pkg Sep 27, 2020
Copy link
Collaborator

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

Rest LGTM

pkg/conn/conn.go Outdated
dom *domain.Domain
storage tikv.Storage
grpcClis struct {
PdController *pdutil.PdController
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we make it an anonymous field?

Suggested change
PdController *pdutil.PdController
*pdutil.PdController

pkg/pdutil/pd_test.go Outdated Show resolved Hide resolved
Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

LGTM (please also resolve conflicts)

pkg/pdutil/pd_test.go Show resolved Hide resolved
@ti-srebot ti-srebot added the status/LGT1 LGTM1 label Sep 28, 2020
@glorv glorv changed the title move pd scheduler to separate pkg move pd scheduler to separated pkg Sep 28, 2020
@kennytm
Copy link
Collaborator

kennytm commented Sep 28, 2020

/lgtm

@ti-srebot ti-srebot added status/LGT2 LGTM2 and removed status/LGT1 LGTM1 labels Sep 28, 2020
@kennytm kennytm merged commit 3bf2cde into pingcap:master Sep 28, 2020
@glorv glorv deleted the pd-mgr branch September 28, 2020 07:09
@glorv
Copy link
Collaborator Author

glorv commented Sep 28, 2020

/run-cherry-picker

@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 failed

1 similar comment
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 failed

@glorv
Copy link
Collaborator Author

glorv commented Sep 28, 2020

/run-cherry-picker

@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 failed

glorv added a commit to glorv/br that referenced this pull request Sep 28, 2020
* move pd scheduler to separate struct

* add comments

* fix import

* fix test

* add NewPdController

* add missing comment

* move pd controller to separated pkg

* fix

* make PDController in Mgr anonymous
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants