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 #634] fix rawBatchPut hang while batch size is larger than MAX_RAW_BATCH_LIMIT (#640) #641

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

ti-srebot
Copy link
Collaborator

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

cherry-pick #640 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/641

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

git push git@github.com:ti-srebot/client-java.git pr/641:release-3.3-506d58f63424

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

What problem does this PR solve?

Issue Number: close #634

Problem Description:

The following code will hang in the master:

HashMap<ByteString, ByteString> kvs = new HashMap<>();
for (int i = 0; i < MAX_RAW_BATCH_LIMIT * 4; i++) {
  kvs.put(prefix.concat(ByteString.copyFromUtf8("key@" + i)), rawValue("value@" + i));
}
client.batchPut(kvs);

What is changed and how does it work?

The code is dislocation while cherry picks other commits from release-3.1

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 29, 2022

Codecov Report

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

@@              Coverage Diff               @@
##             release-3.3     #641   +/-   ##
==============================================
  Coverage               ?   35.07%           
  Complexity             ?     1444           
==============================================
  Files                  ?      278           
  Lines                  ?    17362           
  Branches               ?     1974           
==============================================
  Hits                   ?     6089           
  Misses                 ?    10655           
  Partials               ?      618           

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 6e8c0fc...d711f04. 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 9a127af into tikv:release-3.3 Jul 29, 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.

None yet

2 participants