Skip to content

Conversation

@ti-srebot
Copy link
Collaborator

@ti-srebot ti-srebot commented Jul 31, 2022

cherry-pick #638 to release-3.3
You can switch your code base to this Pull Request by using git-extras:

# In client-java repo:
git pr https://github.com/tikv/client-java/pull/642

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/client-java.git pr/642:release-3.3-1b5edcd8ab8e

Signed-off-by: iosmanthus myosmanthustree@gmail.com

What problem does this PR solve?

Issue Number: close #639

Problem Description:

This pull request tries to reduce the lock granularity of ReionStoreClient and PDClient, we might block the requests while under a heavy workload.

What is changed and how does it work?

  1. Remove the synchronized keyword for RegionStoreBuilder.build, since the region cache's methods have already been synced.
  2. Remove the synchronized keyword in PDClient's update leader logic, since the leader will be eventually updated to the latest one by the update leader scheduler.

Check List for Tests

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

  • Unit test
  • Integration test

Related changes

  • Need to cherry-pick the release branch

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Collaborator Author

/run-all-tests

@codecov
Copy link

codecov bot commented Jul 31, 2022

Codecov Report

❗ No coverage uploaded for pull request base (release-3.3@9a127af). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             release-3.3     #642   +/-   ##
==============================================
  Coverage               ?   34.78%           
  Complexity             ?     1433           
==============================================
  Files                  ?      278           
  Lines                  ?    17377           
  Branches               ?     1974           
==============================================
  Hits                   ?     6045           
  Misses                 ?    10722           
  Partials               ?      610           

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 9a127af...b8b2f9b. Read the comment docs.

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 6c0f6ad into tikv:release-3.3 Jul 31, 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.

3 participants