dynamic_modules: per-cluster persistent cross-priority host map via cluster ABI#45842
Draft
agrawroh wants to merge 1 commit into
Draft
dynamic_modules: per-cluster persistent cross-priority host map via cluster ABI#45842agrawroh wants to merge 1 commit into
agrawroh wants to merge 1 commit into
Conversation
19b7af8 to
d16991e
Compare
…luster ABI The cross-priority host map rebuilds itself with a full O(N) make_shared<HostMap> copy on every membership delta. MainPrioritySetImpl can now back it with an immer persistent map so a delta is applied in O(delta), selected per cluster via setUsePersistentCrossPriorityHostMap(). crossPriorityHostMap() returns an abstract HostLookupTable backed by either the legacy flat map (the default, preserving the exact prior behavior) or the immer map, and updateDynamicHostList takes a host-lookup functor so it stays backing-agnostic. Dynamic-modules clusters opt in through the new envoy_dynamic_module_callback_cluster_use_persistent_host_map ABI callback (the DynamicModuleCluster::setUsePersistentHostMap forwarder) and the Rust SDK EnvoyCluster::set_use_persistent_host_map method. Membership behavior is identical under either backing. Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds an opt-in persistent backing for a cluster's cross-priority host map. A dynamic modules cluster can call the new
envoy_dynamic_module_callback_cluster_use_persistent_host_mapcallback during cluster initto replace the default flat copy-on-write map with an
immerpersistent map, turning each membership update from anO(N)copy into anO(delta)update.The map is published through a new
HostLookupTableinterface so the backing is swappable without changing consumers. The flat map stays the default and membership behavior is identical under either backing.Commit Message: dynamic_modules: per-cluster persistent cross-priority host map via cluster ABI
Risk Level: Low
Testing: Added Tests
Docs Changes: Added
Release Notes: Added