client-java icon indicating copy to clipboard operation
client-java copied to clipboard

[fix #643] fix retry with resolvedlocks info

Open yegetables opened this issue 3 years ago • 3 comments

What problem does this PR solve?

Issue Number: close #643

Problem Description:

The lock information that is being cleaned up will be cached in the RegionStoreClient so that it can be used to unlock the next time it is retried. Failure to cache this information will cause the unlock to fail until the lock is cleaned up until it times out or the lock is cleaned up.

What is changed and how does it work?

Like this pullrequest pingcap/tispark#1907, cache the lock information and try again to avoid creating a new client that does not hold the lock information to retry.

Check List for Tests

  • Unit test
  • Integration test

yegetables avatar Aug 09 '22 07:08 yegetables

Codecov Report

Base: 34.81% // Head: 35.30% // Increases project coverage by +0.49% :tada:

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

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #645      +/-   ##
============================================
+ Coverage     34.81%   35.30%   +0.49%     
- Complexity     1433     1460      +27     
============================================
  Files           278      278              
  Lines         17377    17449      +72     
  Branches       1974     1988      +14     
============================================
+ Hits           6049     6160     +111     
+ Misses        10715    10669      -46     
- Partials        613      620       +7     
Impacted Files Coverage Δ
...java/org/tikv/common/region/RegionStoreClient.java 52.41% <33.33%> (-0.08%) :arrow_down:
...ty/handler/codec/http2/Http2ConnectionHandler.java 47.92% <0.00%> (-0.25%) :arrow_down:
src/main/java/io/grpc/stub/ClientCalls.java 48.51% <0.00%> (+2.31%) :arrow_up:
src/main/java/org/tikv/common/region/TiRegion.java 73.50% <0.00%> (+4.27%) :arrow_up:
...rc/main/java/io/grpc/netty/NettyClientHandler.java 63.36% <0.00%> (+6.46%) :arrow_up:
...ain/java/org/tikv/common/region/RegionManager.java 80.99% <0.00%> (+6.99%) :arrow_up:
.../main/java/org/tikv/common/region/TiStoreType.java 83.33% <0.00%> (+16.66%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Aug 09 '22 07:08 codecov[bot]

/run-all-tests

yegetables avatar Aug 09 '22 08:08 yegetables

Is this modification necessary to increase testing? @iosmanthus

yegetables avatar Aug 09 '22 13:08 yegetables

This PR is stale because it has been open 30 days with no activity. Remove the status/stale label or comment or this PR will be closed in 7 days.

github-actions[bot] avatar Sep 10 '22 00:09 github-actions[bot]

This PR was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Sep 18 '22 00:09 github-actions[bot]

closed by duplicating with https://github.com/tikv/client-java/pull/685

shiyuhang0 avatar Dec 16 '22 04:12 shiyuhang0