Skip to content

Conversation

@iosmanthus
Copy link
Member

@iosmanthus iosmanthus commented Jul 29, 2022

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: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #640 (e2406e0) into master (3128161) will increase coverage by 0.28%.
The diff coverage is 55.55%.

@@             Coverage Diff              @@
##             master     #640      +/-   ##
============================================
+ Coverage     34.98%   35.27%   +0.28%     
- Complexity     1435     1446      +11     
============================================
  Files           278      278              
  Lines         17361    17362       +1     
  Branches       1974     1974              
============================================
+ Hits           6074     6124      +50     
+ Misses        10677    10622      -55     
- Partials        610      616       +6     
Impacted Files Coverage Δ
src/main/java/org/tikv/raw/RawKVClient.java 75.27% <55.55%> (+0.35%) ⬆️
src/main/java/io/grpc/internal/ClientCallImpl.java 56.34% <0.00%> (-0.25%) ⬇️
src/main/java/org/tikv/common/log/SlowLogImpl.java 98.52% <0.00%> (+1.47%) ⬆️
.../main/java/org/tikv/common/region/RegionCache.java 50.92% <0.00%> (+1.85%) ⬆️
...g/tikv/common/operation/iterator/ScanIterator.java 78.94% <0.00%> (+2.63%) ⬆️
...va/org/tikv/common/region/StoreHealthyChecker.java 75.94% <0.00%> (+6.32%) ⬆️
...rc/main/java/io/grpc/netty/NettyClientHandler.java 64.22% <0.00%> (+7.32%) ⬆️
src/main/java/org/tikv/common/region/TiStore.java 74.35% <0.00%> (+12.82%) ⬆️

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 3128161...e2406e0. Read the comment docs.

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
@ti-srebot
Copy link
Collaborator

@xuanyu66, 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 iosmanthus merged commit 506d58f into tikv:master Jul 29, 2022
@iosmanthus iosmanthus deleted the fix-raw-batch-put branch July 29, 2022 10:57
ti-srebot pushed a commit to ti-srebot/client-java that referenced this pull request Jul 29, 2022
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Collaborator

cherry pick to release-3.3 in PR #641

iosmanthus added a commit that referenced this pull request Jul 29, 2022
…_RAW_BATCH_LIMIT (#640) (#641)

Co-authored-by: iosmanthus <dengliming@pingcap.com>
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.

performance of RawKvClient.batchPut()

4 participants