4444import org .opensearch .core .common .io .stream .StreamOutput ;
4545import org .opensearch .security .auth .BackendRegistry ;
4646import org .opensearch .security .configuration .ConfigurationRepository ;
47- import org .opensearch .security .securityconf .DynamicConfigFactory ;
4847import org .opensearch .security .securityconf .impl .CType ;
4948import org .opensearch .threadpool .ThreadPool ;
5049import org .opensearch .transport .TransportRequest ;
@@ -59,7 +58,6 @@ public class TransportConfigUpdateAction extends TransportNodesAction<
5958 protected Logger logger = LogManager .getLogger (getClass ());
6059 private final Provider <BackendRegistry > backendRegistry ;
6160 private final ConfigurationRepository configurationRepository ;
62- private DynamicConfigFactory dynamicConfigFactory ;
6361 private static final Set <CType <?>> SELECTIVE_VALIDATION_TYPES = Set .of (CType .INTERNALUSERS );
6462 // Note: While INTERNALUSERS is used as a marker, the cache invalidation
6563 // applies to all user types (internal, LDAP, etc.)
@@ -72,8 +70,7 @@ public TransportConfigUpdateAction(
7270 final TransportService transportService ,
7371 final ConfigurationRepository configurationRepository ,
7472 final ActionFilters actionFilters ,
75- Provider <BackendRegistry > backendRegistry ,
76- DynamicConfigFactory dynamicConfigFactory
73+ Provider <BackendRegistry > backendRegistry
7774 ) {
7875 super (
7976 ConfigUpdateAction .NAME ,
@@ -89,7 +86,6 @@ public TransportConfigUpdateAction(
8986
9087 this .configurationRepository = configurationRepository ;
9188 this .backendRegistry = backendRegistry ;
92- this .dynamicConfigFactory = dynamicConfigFactory ;
9389 }
9490
9591 public static class NodeConfigUpdateRequest extends TransportRequest {
@@ -133,10 +129,7 @@ protected ConfigUpdateNodeResponse nodeOperation(final NodeConfigUpdateRequest r
133129 if (canHandleSelectively (configupdateRequest )) {
134130 backendRegistry .get ().invalidateUserCache (configupdateRequest .getEntityNames ());
135131 } else {
136- boolean didReload = configurationRepository .reloadConfiguration (CType .fromStringValues ((configupdateRequest .getConfigTypes ())));
137- if (didReload ) {
138- backendRegistry .get ().invalidateCache ();
139- }
132+ configurationRepository .reloadConfiguration (CType .fromStringValues ((configupdateRequest .getConfigTypes ())));
140133 }
141134 return new ConfigUpdateNodeResponse (clusterService .localNode (), configupdateRequest .getConfigTypes (), null );
142135 }
0 commit comments