Commit bf9b60b
authored
[Snapshot Cache] Simplify Snapshot cache responses. (#1356)
The snapshot cache reply logic for sotw and delta watches has grown complex and very distinct from the linear cache.
This has created issues recently, mostly related to the logic in `CreateWatch` having to perfectly match the one in `respond` to avoid major issues.
This commit simplifies the code in the same model as the linear cache: a single method creates the response, and the watch is created if no response is returned.
There is some behavior change: if the type is not Listeners or Clusters, the control-plane will now only return the modified resources, per the xDS protocol. Please create an issue if this creates problems.
Further work will build on this to:
- support a new snapshot model, allowing per type updates and versions, as well as better delta handling
- use per-resource version even in sotw to avoid resending resources when not needed.
- provide support for partial wildcard responses, to provide a new support model for wildcard + resources subscriptions (e.g. for OdCDS).
Signed-off-by: Valerian Roche <valerian.roche@gmail.com>1 parent dc08459 commit bf9b60b
File tree
5 files changed
+396
-282
lines changed- pkg/cache/v3
5 files changed
+396
-282
lines changedThis file was deleted.
0 commit comments