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

*: refactor server entry point to support multi-mode service #5921

Merged
merged 3 commits into from Feb 7, 2023

Conversation

binshi-bing
Copy link
Contributor

@binshi-bing binshi-bing commented Feb 7, 2023

Signed-off-by: Bin Shi binshi.bing@gmail.com

What problem does this PR solve?

Issue Number: Ref #5836

What is changed and how does it work?

A service in different mode has different config struct and initialization logic, so we need to abstract an interface to create server.

A service in different mode has different config struct and initialization logic, so we need to abstract an interface to create server.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    I did some compatibility test manually by verifying that the all-in-one pd-server can start normally w/o and w/ parameter.

Related changes

None.

Release note

None.

A service in different mode has different config struct and initialization logic, so we need to abstract an interface to create server.

Signed-off-by: Bin Shi <binshi.bing@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 7, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot
Copy link
Member

Hi @binshi-bing. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@nolouch nolouch requested a review from lhy1024 February 7, 2023 07:45
@binshi-bing
Copy link
Contributor Author

This pr is split from #5917 to unblock #5858 by @lhy1024

pkg/basic_server/basic_server.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 7, 2023
@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

Base: 75.44% // Head: 75.31% // Decreases project coverage by -0.14% ⚠️

Coverage data is based on head (58a7b1f) compared to base (77d7be0).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5921      +/-   ##
==========================================
- Coverage   75.44%   75.31%   -0.14%     
==========================================
  Files         345      345              
  Lines       35126    35126              
==========================================
- Hits        26501    26454      -47     
- Misses       6325     6374      +49     
+ Partials     2300     2298       -2     
Flag Coverage Δ
unittests 75.31% <ø> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/errs/errs.go 75.00% <0.00%> (-25.00%) ⬇️
server/api/diagnostic.go 76.92% <0.00%> (-23.08%) ⬇️
pkg/tso/allocator_manager.go 59.51% <0.00%> (-4.52%) ⬇️
server/cluster/diagnostic_manager.go 72.04% <0.00%> (-4.31%) ⬇️
server/region_syncer/client.go 79.85% <0.00%> (-3.74%) ⬇️
pkg/election/leadership.go 77.31% <0.00%> (-3.10%) ⬇️
pkg/election/lease.go 84.05% <0.00%> (-2.90%) ⬇️
pkg/tso/local_allocator.go 62.16% <0.00%> (-2.71%) ⬇️
server/schedulers/shuffle_hot_region.go 55.12% <0.00%> (-2.57%) ⬇️
server/schedule/labeler/labeler.go 76.77% <0.00%> (-1.30%) ⬇️
... and 21 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

pkg/basic_server/basic_server.go Outdated Show resolved Hide resolved
pkg/basic_server/basic_server.go Outdated Show resolved Hide resolved
pkg/basic_server/basic_server.go Outdated Show resolved Hide resolved
Signed-off-by: Bin Shi <binshi.bing@gmail.com>
Signed-off-by: Bin Shi <binshi.bing@gmail.com>
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 7, 2023
@rleungx rleungx changed the title Refactor server entry point to support multi-mode service *: refactor server entry point to support multi-mode service Feb 7, 2023
@lhy1024
Copy link
Contributor

lhy1024 commented Feb 7, 2023

/merge

@ti-chi-bot
Copy link
Member

@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 58a7b1f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 7, 2023
@lhy1024
Copy link
Contributor

lhy1024 commented Feb 7, 2023

/rebuild

@lhy1024
Copy link
Contributor

lhy1024 commented Feb 7, 2023

/test build

1 similar comment
@purelind
Copy link
Contributor

purelind commented Feb 7, 2023

/test build

@wuhuizuo
Copy link
Contributor

wuhuizuo commented Feb 7, 2023

/ok-to-test

@ti-chi-bot
Copy link
Member

@wuhuizuo: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot merged commit 7497e3d into tikv:master Feb 7, 2023
@binshi-bing binshi-bing deleted the refactor-svr-entry-point branch February 14, 2023 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test release-note-none status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants