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

client: refine some client code #4205

Merged
merged 3 commits into from
Oct 20, 2021
Merged

Conversation

JmPotato
Copy link
Member

Signed-off-by: JmPotato ghzpotato@gmail.com

What problem does this PR solve?

Refine some client code.

What is changed and how it works?

  • Move go c.handleDispatcher(dispatcherCtx, dcLocation, dispatcher.tsoRequestCh) into the function createTSODispatcher to reduce an atomic loading operation.
  • healthCancel() as soon as possible.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@JmPotato JmPotato added the component/client Client logic. label Oct 13, 2021
@JmPotato JmPotato requested a review from rleungx October 13, 2021 06:11
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 13, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 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 ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Oct 13, 2021
@JmPotato
Copy link
Member Author

@rleungx PTAL, thx!

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 19, 2021
@JmPotato JmPotato added the require-LGT1 Indicates that the PR requires an LGTM. label Oct 19, 2021
@JmPotato
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

@JmPotato: 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: 1d6650a

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 19, 2021
@ti-chi-bot
Copy link
Member

@JmPotato: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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.

@JmPotato
Copy link
Member Author

/rebuild

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@ti-chi-bot ti-chi-bot removed do-not-merge/invalid-commit-message status/can-merge Indicates a PR has been approved by a committer. labels Oct 19, 2021
@JmPotato
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

@JmPotato: 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: 85a1799

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 19, 2021
@JmPotato
Copy link
Member Author

/run-unit-tests

@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #4205 (85a1799) into master (b4c1804) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4205      +/-   ##
==========================================
- Coverage   74.68%   74.67%   -0.01%     
==========================================
  Files         260      260              
  Lines       26705    26700       -5     
==========================================
- Hits        19944    19938       -6     
- Misses       4973     4978       +5     
+ Partials     1788     1784       -4     
Flag Coverage Δ
unittests 74.67% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
client/client.go 72.45% <100.00%> (-0.19%) ⬇️
server/member/member.go 64.70% <0.00%> (-2.14%) ⬇️
server/election/leadership.go 75.25% <0.00%> (-2.07%) ⬇️
server/grpc_service.go 49.13% <0.00%> (-1.43%) ⬇️
server/tso/allocator_manager.go 61.00% <0.00%> (-1.34%) ⬇️
server/server.go 71.40% <0.00%> (-1.20%) ⬇️
server/tso/global_allocator.go 60.84% <0.00%> (-1.06%) ⬇️
server/core/storage.go 68.79% <0.00%> (-0.76%) ⬇️
server/schedule/operator_controller.go 83.50% <0.00%> (-0.41%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4c1804...85a1799. Read the comment docs.

@ti-chi-bot ti-chi-bot merged commit 35d07a1 into tikv:master Oct 20, 2021
@JmPotato JmPotato deleted the refine_tso_dispatcher branch October 20, 2021 02:48
hzh0425 pushed a commit to hzh0425/pd that referenced this pull request Nov 16, 2021
* Refine some client code

Signed-off-by: JmPotato <ghzpotato@gmail.com>

* ref tikv#3149

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: hzh0425 <642256541@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/client Client logic. release-note-none Denotes a PR that doesn't merit a release note. require-LGT1 Indicates that the PR requires an LGTM. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants