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

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

Closed
qidi1 opened this issue Sep 23, 2022 · 1 comment · Fixed by #653
Labels
type/feature-request New feature request

Comments

@qidi1
Copy link
Contributor

qidi1 commented Sep 23, 2022

Feature Request

Now the cache invalid envet is all handle by client-java. We want add a CallBack interface that allows users to customize the behavior when requesting region data fails.
In TiSpark, a Job execution may involve multiple machines, and the regionMananger on each machine may have its own invalid region. Through CallBack, we can collect the invalid regions from all machines and perform invalid processing on each machine to refresh them. This reduces the probability that a subsequent Job will encounter a region failure.

@qidi1 qidi1 added the type/feature-request New feature request label Sep 23, 2022
qidi1 added a commit to qidi1/client-java that referenced this issue Sep 23, 2022
…hen the region cache fails, Add RegionCacheInvalidCallBack.

Signed-off-by: qidi1 <1083369179@qq.com>
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity.

shiyuhang0 added a commit that referenced this issue Jan 30, 2023
* Close #654 To let the upper layers customize their own behavior when the region cache fails, Add RegionCacheInvalidCallBack.

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

* change callback to list

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

* format code

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

* change as comment

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

* change to synchronized

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

* change list to copy on write

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

* change to muti thread

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

* format code

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

* add comment

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

* change to magical num

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

* add comment

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

* change log levle

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

* Fmt

---------

Signed-off-by: qidi1 <1083369179@qq.com>
Co-authored-by: shi yuhang <52435083+shiyuhang0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature-request New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants