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

[close #663] Select TiFlash Stores Round-Robin #662

Merged
merged 8 commits into from
Nov 1, 2022

Conversation

shiyuhang0
Copy link
Collaborator

@shiyuhang0 shiyuhang0 commented Oct 31, 2022

What problem does this PR solve?

Problem Description: client-java always selects the first TiFlash store which may cause read hotspot.

What is changed and how does it work?

Choose the TiFlash stores Round-Robin

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has methods of interface change
  • Has persistent data change
  • No code

Check List for Tests

This PR has been tested by at least one of the following methods:

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Possible performance regression, WHY: TBD
  • Increased code complexity, WHY: TBD
  • Breaking backward compatibility, WHY: TBD
  • NO side effects

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note
  • NO related changes

Signed-off-by: shiyuhang <[email protected]>
@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Base: 34.81% // Head: 35.06% // Increases project coverage by +0.25% 🎉

Coverage data is based on head (841c298) compared to base (1b5edcd).
Patch coverage: 80.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #662      +/-   ##
============================================
+ Coverage     34.81%   35.06%   +0.25%     
- Complexity     1433     1446      +13     
============================================
  Files           278      278              
  Lines         17377    17380       +3     
  Branches       1974     1975       +1     
============================================
+ Hits           6049     6095      +46     
+ Misses        10715    10666      -49     
- Partials        613      619       +6     
Impacted Files Coverage Δ
...ain/java/org/tikv/common/region/RegionManager.java 79.73% <80.00%> (+5.73%) ⬆️
...rc/main/java/io/grpc/netty/NettyClientHandler.java 57.11% <0.00%> (+0.21%) ⬆️
src/main/java/io/grpc/internal/ClientCallImpl.java 56.82% <0.00%> (+0.48%) ⬆️
src/main/java/io/grpc/stub/ClientCalls.java 48.51% <0.00%> (+2.31%) ⬆️
...va/org/tikv/common/region/StoreHealthyChecker.java 72.15% <0.00%> (+2.53%) ⬆️
...ty/handler/codec/http2/Http2ConnectionHandler.java 52.07% <0.00%> (+3.91%) ⬆️
src/main/java/org/tikv/common/region/TiRegion.java 73.50% <0.00%> (+4.27%) ⬆️
.../main/java/org/tikv/common/region/TiStoreType.java 83.33% <0.00%> (+16.66%) ⬆️

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.

Signed-off-by: shiyuhang <[email protected]>
Signed-off-by: shiyuhang <[email protected]>
Signed-off-by: shiyuhang <[email protected]>
Signed-off-by: shiyuhang <[email protected]>
Signed-off-by: shiyuhang <[email protected]>
@shiyuhang0 shiyuhang0 changed the title Select TiFlash Stores randomly Select TiFlash Stores Round-Robin Oct 31, 2022
@shiyuhang0 shiyuhang0 changed the title Select TiFlash Stores Round-Robin [close #663] Select TiFlash Stores Round-Robin Oct 31, 2022
Signed-off-by: shiyuhang <[email protected]>
zhangyangyu
zhangyangyu previously approved these changes Oct 31, 2022
@ti-srebot
Copy link
Collaborator

@zhangyangyu, Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments. You are not a reviewer or committer or co-leader or leader.

@iosmanthus
Copy link
Member

LGTM

Signed-off-by: shiyuhang <[email protected]>
Copy link
Member

@iosmanthus iosmanthus left a comment

Choose a reason for hiding this comment

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

LGTM

@iosmanthus iosmanthus merged commit 8cb7a82 into tikv:master Nov 1, 2022
ti-srebot pushed a commit to ti-srebot/client-java that referenced this pull request Dec 20, 2022
@ti-srebot
Copy link
Collaborator

cherry pick to release-3.3 in PR #688

iosmanthus pushed a commit to iosmanthus/client-java that referenced this pull request Dec 30, 2022
shiyuhang0 pushed a commit to shiyuhang0/client-java that referenced this pull request Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants