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

tso: refactor the tso service #2803

Merged
merged 7 commits into from
Aug 21, 2020
Merged

tso: refactor the tso service #2803

merged 7 commits into from
Aug 21, 2020

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Aug 20, 2020

Signed-off-by: JmPotato [email protected]

What problem does this PR solve?

Part of #2759. Refactor the tso service to use Leadership and TSOAllocator. After adding the new feature of local TSO allocator in the future, there will be two kinds of member roles need to be elected, one is PD leader, another is Local TSO Allocator. For more details, you can check this document.

What is changed and how it works?

Modify the tso package to be more extendable as a TSOAllocator in order to introduce the Local TSO Allocator and new Global TSO Allocator later.

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has tso pkg change.

Related changes

Release note

  • Refactor the tso service.

@JmPotato JmPotato added the component/tso Timestamp Oracle. label Aug 20, 2020
@JmPotato JmPotato added the type/refactor The issue belongs to a refactor work. label Aug 20, 2020
server/member/global_tso_allocator.go Outdated Show resolved Hide resolved
server/member/global_tso_allocator.go Outdated Show resolved Hide resolved
@JmPotato JmPotato requested a review from Yisaer August 21, 2020 09:59
Copy link
Contributor

@nolouch nolouch 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 21, 2020
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).

@JmPotato
Copy link
Member Author

/run-all-tests

1 similar comment
@JmPotato
Copy link
Member Author

/run-all-tests

@JmPotato JmPotato merged commit 7a6a9da into tikv:master Aug 21, 2020
@JmPotato JmPotato deleted the refactor_tso branch August 21, 2020 10:47
@nolouch
Copy link
Contributor

nolouch commented Aug 21, 2020

/run-build-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tso Timestamp Oracle. status/LGT1 Indicates that a PR has LGTM 1. type/refactor The issue belongs to a refactor work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants