Skip to content

config: introduce GrpcMuxCache component & tests#45071

Draft
antoniovleonti wants to merge 3 commits into
envoyproxy:mainfrom
antoniovleonti:cache-1
Draft

config: introduce GrpcMuxCache component & tests#45071
antoniovleonti wants to merge 3 commits into
envoyproxy:mainfrom
antoniovleonti:cache-1

Conversation

@antoniovleonti
Copy link
Copy Markdown
Contributor

@antoniovleonti antoniovleonti commented May 14, 2026

Commit Message: config: introduce GrpcMuxCache component & tests
Additional Description:

This pr adds a temporarily unused GrpcMuxCache so that we can reuse GrpcMuxes iff they have the exact same config source & type url.

Risk Level: none, adding unused standalone library
Testing: unit tests added
Docs Changes: none needed
Release Notes: none
Platform Specific Features: none

I used generative AI to help create this change

Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
@antoniovleonti
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a GrpcMuxCache utility to manage and reuse GrpcMux instances via a weak_ptr cache, alongside associated unit tests. The reviewer identified a style violation in the GrpcMuxKey class regarding public member naming conventions. Additionally, concerns were raised about the inclusion of type_url in the cache key potentially hindering mux sharing for Aggregated Discovery Services (ADS), and the lack of a pruning mechanism for expired entries in the cache map which could lead to memory growth.

Comment thread source/common/config/grpc_mux_cache.h
Comment thread source/common/config/grpc_mux_cache.h
Comment thread source/common/config/grpc_mux_cache.h
Signed-off-by: antoniovleonti <leonti@google.com>
@antoniovleonti
Copy link
Copy Markdown
Contributor Author

/assign @adisuissa

@antoniovleonti
Copy link
Copy Markdown
Contributor Author

/retest

@antoniovleonti antoniovleonti changed the title config: introduce GrpcMuxCache component and dedicated unit tests config: introduce GrpcMuxCache component & tests May 15, 2026
@antoniovleonti antoniovleonti marked this pull request as draft May 21, 2026 20:17
@antoniovleonti
Copy link
Copy Markdown
Contributor Author

per our offline discussion I need to take another look at this

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.

2 participants