-
Notifications
You must be signed in to change notification settings - Fork 905
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
stop proxy cache asynchronously #3027
Conversation
How long it takes now? |
Hi @ikaven1024, does this change affect the access of other client requests to the cache resources of the cluster? I have another question, why not do it here: https://github.com/karmada-io/karmada/blob/master/pkg/search/proxy/store/multi_cluster_cache.go#L71 |
I add logs to measure the spending time:
|
You are right. But when users remove resource from func (c *resourceCache) stop() {
klog.Infof("Stop store for %s %s", c.clusterName, c.resource)
go c.Store.DestroyFunc()
} |
Great! |
Signed-off-by: yingjinhui <yingjinhui@didiglobal.com>
/approve Hi @ikaven1024, do we need to cherry-pick this path to the previous release? |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XiShanYongYe-Chang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
…27-upstream-release-1.4 Automated cherry pick of #3027: stop proxy cache asynchronously
…27-upstream-release-1.3 Automated cherry pick of #3027: stop proxy cache asynchronously
Signed-off-by: yingjinhui yingjinhui@didiglobal.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
When a member cluster is down, stopping the proxy cache for this cluster takes a few seconds(as below log, stop the pods cache takes 9s)
During stopping, it hold the lock of
MultiClusterCache
. This results in client requests will be blocked. Because request handlers also need this lock:karmada/pkg/search/proxy/store/multi_cluster_cache.go
Lines 162 to 168 in 7b4c541
karmada/pkg/search/proxy/store/multi_cluster_cache.go
Lines 319 to 321 in 7b4c541
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: