forked from envoyproxy/go-control-plane
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[server][cache] Ensure subscription is properly updated for sotw and …
…delta (#9) Currently sotw and delta watches use different interfaces to track the stream state An assumption used to be that sotw watches are stateless and can be processed from the request itself. This was already altered in envoyproxy#508, but it only covers the usecases partially (e.g. it does not cover subscribing/unsubscribing to wildcard). The current object passed to track the subscription provides multiple issues: - it is not an interface, restricting evolution or testing for users building a separate cache - it tracks some objects per types, other globally, based on sotw or delta, making it confusing and hard to use in a consistent way This commit replaces the legacy streamState by the notion of Subscription per type. StreamState is not relevant to the cache, as it only requires to know the subscription status (e.g. the last nonce is not needed), while a stream can multiplex multiple types. Further work will come to: - fill the subscription with the same attributes in sotw and delta, allowing to take proper decisions on what to reply - Fix multiple issues within the cache in sotw - Fix handling of explicit vs. legacy wildcard in sotw and delta Now that the `Subscription` has been standardized to be uniform for `sotw` and `delta`, as well as always for the given request type, this PR ensures all the fields are properly populated in all cases A follow-up PR will rely on those informations to address current issues in the cache implementations related to resource tracking Signed-off-by: Valerian Roche <[email protected]>
- Loading branch information
1 parent
4dd269c
commit b01bf57
Showing
25 changed files
with
1,019 additions
and
623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.