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

election, member: adjust some election methods #2831

Merged
merged 11 commits into from
Aug 26, 2020

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Aug 25, 2020

Signed-off-by: JmPotato [email protected]

What problem does this PR solve?

Part of #2759. Adjust some election methods.

What is changed and how it works?

  • Make member.Leadership non-public.
  • Make WatchLeader a more general method because the TSO allocator will also use the same logic to watch the allocator changing.
  • Adjust some functions' signatures to make them more sense in using.
  • Add and update some comments.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Adjust some election methods.

@JmPotato JmPotato added the component/election Election related logic. label Aug 25, 2020
@JmPotato JmPotato changed the title election, member: adjust some election methods [WIP] election, member: adjust some election methods Aug 25, 2020
@JmPotato JmPotato changed the title [WIP] election, member: adjust some election methods election, member: adjust some election methods Aug 25, 2020
@JmPotato
Copy link
Member Author

/run-all-tests

server/member/member.go Outdated Show resolved Hide resolved
@JmPotato JmPotato force-pushed the update_leadership branch 3 times, most recently from c889c6b to 9a55028 Compare August 26, 2020 06:18
@JmPotato JmPotato requested a review from Yisaer August 26, 2020 06:27
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 ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 26, 2020
Signed-off-by: JmPotato <[email protected]>
@Yisaer
Copy link
Contributor

Yisaer commented Aug 26, 2020

/run-all-tests

2 similar comments
@Yisaer
Copy link
Contributor

Yisaer commented Aug 26, 2020

/run-all-tests

@Yisaer
Copy link
Contributor

Yisaer commented Aug 26, 2020

/run-all-tests

@JmPotato
Copy link
Member Author

/run-all-tests

@JmPotato JmPotato merged commit efb23c1 into tikv:master Aug 26, 2020
@JmPotato JmPotato deleted the update_leadership branch August 26, 2020 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/election Election related logic. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants