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

member: refactor election #2767

Merged
merged 4 commits into from
Aug 18, 2020
Merged

member: refactor election #2767

merged 4 commits into from
Aug 18, 2020

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Aug 13, 2020

Signed-off-by: JmPotato [email protected]

What problem does this PR solve?

Part of #2759. Refactor election logic.

What is changed and how it works?

Pull away some common methods of election from member and prepare for incoming TSO refactoring next.

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has leader election change

Release note

Refactor election logic.

@JmPotato JmPotato added status/DNM type/refactor The issue belongs to a refactor work. labels Aug 13, 2020
@tikv tikv deleted a comment from sre-bot Aug 13, 2020
@tikv tikv deleted a comment from sre-bot Aug 13, 2020
@JmPotato JmPotato added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed status/DNM labels Aug 13, 2020
@JmPotato JmPotato changed the title [DNM] member: refactor election [WIP] member: refactor election Aug 13, 2020
@JmPotato
Copy link
Member Author

/run-all-tests

@JmPotato
Copy link
Member Author

/rebuild

@JmPotato JmPotato added the component/election Election related logic. label Aug 14, 2020
@JmPotato JmPotato changed the title [WIP] member: refactor election member: refactor election Aug 14, 2020
@JmPotato JmPotato removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2020
@JmPotato
Copy link
Member Author

/run-all-tests

server/election/leadership.go Outdated Show resolved Hide resolved
server/server.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

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

plz address the comments and solve the conflicts.

server/election/lease.go Outdated Show resolved Hide resolved
server/election/lease.go Outdated Show resolved Hide resolved
server/election/leadership.go Outdated Show resolved Hide resolved
server/election/leadership.go Outdated Show resolved Hide resolved
@JmPotato JmPotato force-pushed the refactor_election branch 3 times, most recently from 17aedaf to 9842a0c Compare August 17, 2020 09:21
@JmPotato JmPotato added status/DNM do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed status/DNM labels Aug 17, 2020
@JmPotato JmPotato removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 17, 2020
@JmPotato JmPotato force-pushed the refactor_election branch 2 times, most recently from e81abf1 to 41a99ec Compare August 17, 2020 16:23
Signed-off-by: 混沌DM <[email protected]>
Signed-off-by: JmPotato <[email protected]>
@JmPotato
Copy link
Member Author

/run-all-tests

Copy link
Contributor

@Yisaer Yisaer left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot
Copy link
Contributor

@Yisaer,Thanks for your review. However, LGTM is restricted to Reviewers or higher roles.See the corresponding SIG page for more information. Related SIGs: scheduling(slack).

@ZenoTan
Copy link
Contributor

ZenoTan commented Aug 18, 2020

LGTM

@ti-srebot
Copy link
Contributor

@ZenoTan,Thanks for your review. However, LGTM is restricted to Reviewers or higher roles.See the corresponding SIG page for more information. Related SIGs: scheduling(slack).

@JmPotato
Copy link
Member Author

/run-all-tests

1 similar comment
@JmPotato
Copy link
Member Author

/run-all-tests

@JmPotato JmPotato merged commit 698c408 into tikv:master Aug 18, 2020
@JmPotato JmPotato deleted the refactor_election branch August 18, 2020 07:29
ZenoTan pushed a commit to ZenoTan/pd that referenced this pull request Aug 24, 2020
Signed-off-by: JmPotato <[email protected]>
Signed-off-by: ZenoTan <[email protected]>
jyz0309 pushed a commit to jyz0309/pd that referenced this pull request Aug 24, 2020
jyz0309 pushed a commit to jyz0309/pd that referenced this pull request Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/election Election related logic. type/refactor The issue belongs to a refactor work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants