envoyproxy / java-control-plane

Java implementation of an Envoy gRPC control plane
Apache License 2.0
291 stars 136 forks source link

cache: unsubscribe removed resources on reconnects #320

Open sschepens opened 7 months ago

sschepens commented 7 months ago

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.

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.