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

cache: unsubscribe removed resources on reconnects #320

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sschepens
Copy link
Contributor

When reconnections occur, envoy sends a new request subscribing to all the resources it currently had.
If a resource has just been removed, we fail to notify Envoy the the resource has been removed.

This happens because on the very first stream request, we dont have any trackedResources, we should instead also check pendingResources.

Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4577722) 86.16% compared to head (154e449) 86.24%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #320      +/-   ##
============================================
+ Coverage     86.16%   86.24%   +0.08%     
- Complexity      361      363       +2     
============================================
  Files            42       42              
  Lines          1178     1178              
  Branches         97       97              
============================================
+ Hits           1015     1016       +1     
+ Misses          116      115       -1     
  Partials         47       47              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sschepens sschepens changed the title fix: Ensure we unsubscribe removed resources on reconnects cache: Ensure we unsubscribe removed resources on reconnects Jan 24, 2024
@sschepens sschepens changed the title cache: Ensure we unsubscribe removed resources on reconnects cache: ensure we unsubscribe removed resources on reconnects Jan 24, 2024
@sschepens sschepens changed the title cache: ensure we unsubscribe removed resources on reconnects cache: unsubscribe removed resources on reconnects Jan 24, 2024
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.

None yet

2 participants