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 DeleteWatch in Cache #57

Closed
jessicayuen opened this issue Apr 13, 2020 · 1 comment · Fixed by #59
Closed

Add DeleteWatch in Cache #57

jessicayuen opened this issue Apr 13, 2020 · 1 comment · Fixed by #59
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jessicayuen
Copy link
Member

When onCancel is called from go-control-plane to the Orchestrator, Orchestrator removes management of this watch, but the watch persists in the Cache until the TTL expires. We could more effectively manage resources if a DeleteWatch(req *v2.DiscoveryRequest) function existed.

@jessicayuen jessicayuen added this to the MVP - v1.0.0 milestone Apr 13, 2020
@LisaLudique LisaLudique self-assigned this Apr 14, 2020
@LisaLudique
Copy link
Contributor

lrucache doesn't expose a way to easily iterate over the cache entries. We could maintain a list of all the keys for this purpose.

@jessicayuen jessicayuen added the enhancement New feature or request label Apr 16, 2020
jessicayuen pushed a commit that referenced this issue Apr 23, 2020
Fixes #57 

This change adds an API to the cache to support deleting a request when given the key and the (pointer to the) request, which the orchestrator can use upon cancellation. If the key is not in the cache, nothing happens.

The input type to AddRequest was also changed to take a pointer to a request.

Signed-off-by: Lisa Lu <lisalu@lyft.com>
jessicayuen pushed a commit to jessicayuen/xds-relay that referenced this issue Apr 24, 2020
Fixes envoyproxy#57

This change adds an API to the cache to support deleting a request when given the key and the (pointer to the) request, which the orchestrator can use upon cancellation. If the key is not in the cache, nothing happens.

The input type to AddRequest was also changed to take a pointer to a request.

Signed-off-by: Lisa Lu <lisalu@lyft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants