@@ -116,6 +116,7 @@ public void uncaughtException(Thread t, Throwable e) {
116
116
private volatile Server delegate ;
117
117
118
118
// Must be updated in the sync context.
119
+ // TODO(sergiitk): [QUESTION] should this be per filter chain too?
119
120
private final HashMap <String , Filter > activeFilters = new HashMap <>();
120
121
121
122
XdsServerWrapper (
@@ -464,6 +465,7 @@ private void shutdown() {
464
465
private void updateSelector () {
465
466
Map <FilterChain , AtomicReference <ServerRoutingConfig >> filterChainRouting = new HashMap <>();
466
467
savedRdsRoutingConfigRef .clear ();
468
+ // TODO(sergiitk): [QUESTION] is filter names unique across all chains?
467
469
for (FilterChain filterChain : filterChains ) {
468
470
filterChainRouting .put (filterChain , generateRoutingConfig (filterChain ));
469
471
}
@@ -499,6 +501,7 @@ private AtomicReference<ServerRoutingConfig> generateRoutingConfig(FilterChain f
499
501
serverRoutingConfigRef .set (serverRoutingConfig );
500
502
} else {
501
503
serverRoutingConfigRef .set (ServerRoutingConfig .FAILING_ROUTING_CONFIG );
504
+ // TODO(sergiitk): [QUESTION] do we need to shutdown all filters here?
502
505
}
503
506
savedRdsRoutingConfigRef .put (filterChain , serverRoutingConfigRef );
504
507
return serverRoutingConfigRef ;
@@ -725,6 +728,7 @@ private void updateRdsRoutingConfig() {
725
728
if (savedVirtualHosts == null ) {
726
729
updatedRoutingConfig = ServerRoutingConfig .FAILING_ROUTING_CONFIG ;
727
730
} else {
731
+ // TODO(sergiitk): [QUESTION] same applies here: should filters be per chain?
728
732
ImmutableMap <Route , ServerInterceptor > updatedInterceptors =
729
733
generatePerRouteInterceptors (
730
734
filterChain .httpConnectionManager ().httpFilterConfigs (),
0 commit comments