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 #684] Fix batch get blocked by write (#685) #691

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

ti-srebot
Copy link
Collaborator

@ti-srebot ti-srebot commented Dec 20, 2022

cherry-pick #685 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/691

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

git push [email protected]:ti-srebot/client-java.git pr/691:release-3.3-1f096b5a381a

Signed-off-by: shiyuhang [email protected]

What problem does this PR solve?

Issue Number: close #684

Problem Description: TBD

What is changed and how does it work?

Client-java's batchGet should retry to request TiKV with the ResolvedLocks context. So that the requests can ignore locks belonging to other transactions, because their commit_ts > read request's start_ts after pushing min_commit_ts in the first batchGet,

Just add ResolvedLocks filed in KVClient to cache the information and used it in the retry.

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

@ti-srebot
Copy link
Collaborator Author

/run-all-tests

@codecov
Copy link

codecov bot commented Dec 20, 2022

Codecov Report

❗ No coverage uploaded for pull request base (release-3.3@571a47c). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@              Coverage Diff               @@
##             release-3.3     #691   +/-   ##
==============================================
  Coverage               ?   36.74%           
  Complexity             ?     1534           
==============================================
  Files                  ?      278           
  Lines                  ?    17386           
  Branches               ?     1976           
==============================================
  Hits                   ?     6388           
  Misses                 ?    10347           
  Partials               ?      651           

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.

@zhangyangyu zhangyangyu merged commit 82c99e2 into tikv:release-3.3 Dec 20, 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.

3 participants