Skip to content

Conversation

@qidi1
Copy link
Contributor

@qidi1 qidi1 commented Sep 22, 2022

Signed-off-by: qidi1 1083369179@qq.com

What problem does this PR solve?

Issue Number: close #654

Problem Description: TBD

What is changed and how does it work?

Add RegionCacheInvalidCallBack. Let the upper layers customize their own behavior when the region cache fails.

Code changes

  • No code

Check List for Tests

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

  • Unit test

Side effects

  • NO side effects

Related changes

  • NO related changes

@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Base: 37.65% // Head: 37.97% // Increases project coverage by +0.32% 🎉

Coverage data is based on head (21354fa) compared to base (d278e3a).
Patch coverage: 73.68% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #653      +/-   ##
============================================
+ Coverage     37.65%   37.97%   +0.32%     
- Complexity     1589     1603      +14     
============================================
  Files           278      278              
  Lines         17420    17462      +42     
  Branches       1982     1984       +2     
============================================
+ Hits           6559     6631      +72     
+ Misses        10207    10175      -32     
- Partials        654      656       +2     
Impacted Files Coverage Δ
.../org/tikv/common/operation/RegionErrorHandler.java 50.32% <55.88%> (+15.16%) ⬆️
...va/org/tikv/common/event/CacheInvalidateEvent.java 36.84% <100.00%> (+36.84%) ⬆️
...ain/java/org/tikv/common/region/RegionManager.java 82.14% <100.00%> (+1.49%) ⬆️
src/main/java/org/tikv/txn/TxnExpireTime.java 63.15% <0.00%> (-10.53%) ⬇️
...rc/main/java/io/grpc/netty/NettyClientHandler.java 53.23% <0.00%> (-0.87%) ⬇️
src/main/java/org/tikv/common/codec/Codec.java 23.93% <0.00%> (-0.33%) ⬇️
...java/org/tikv/common/region/RegionStoreClient.java 57.47% <0.00%> (+0.29%) ⬆️
src/main/java/io/grpc/stub/ClientCalls.java 48.51% <0.00%> (+2.31%) ⬆️
src/main/java/io/grpc/internal/ClientCallImpl.java 59.07% <0.00%> (+2.42%) ⬆️
... and 2 more

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.

@iosmanthus
Copy link
Member

Please open an issue to describe it.

…hen the region cache fails, Add RegionCacheInvalidCallBack.

Signed-off-by: qidi1 <1083369179@qq.com>
@iosmanthus iosmanthus changed the title Add RegionCacheInvalidCallBack [close #654] Add RegionCacheInvalidCallBack Sep 23, 2022
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
Signed-off-by: qidi1 <1083369179@qq.com>
shiyuhang0
shiyuhang0 previously approved these changes Sep 29, 2022
@ti-srebot
Copy link
Collaborator

@shiyuhang0, 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.

@github-actions
Copy link

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
Copy link

github-actions bot commented Nov 7, 2022

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

@github-actions github-actions bot closed this Nov 7, 2022
@shiyuhang0 shiyuhang0 enabled auto-merge (squash) January 29, 2023 06:26
@shiyuhang0 shiyuhang0 disabled auto-merge January 29, 2023 06:26
@shiyuhang0 shiyuhang0 merged commit dda1029 into tikv:master Jan 30, 2023
ti-srebot pushed a commit to ti-srebot/client-java that referenced this pull request Jan 30, 2023
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Collaborator

cherry pick to release-3.3 in PR #715

zhangyangyu pushed a commit that referenced this pull request Feb 9, 2023
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Co-authored-by: tomato <38561029+qidi1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a CallBack interface that allows users to customize the behavior when requesting region data fails

7 participants