File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -369,19 +369,18 @@ public void applyClusterState(ClusterChangedEvent event) {
369369 .filter (entry -> entry .getValue ().getCredential () != null )
370370 .collect (Collectors .toUnmodifiableMap (Map .Entry ::getKey , Map .Entry ::getValue ));
371371
372- if (allClientSettings .size () != clientSettings .size ()) {
373- logger .warn (
374- "Project [{}] has [{}] GCS client settings, but [{}] is usable due to missing credentials for clients {}" ,
375- project .id (),
376- allClientSettings .size (),
377- clientSettings .size (),
378- Sets .difference (allClientSettings .keySet (), clientSettings .keySet ())
379- );
380- }
381-
382372 // TODO: If performance is an issue, we may consider comparing just the relevant project secrets for new or updated clients
383373 // and avoid building the clientSettings
384374 if (newOrUpdated (project .id (), clientSettings )) {
375+ if (allClientSettings .size () != clientSettings .size ()) {
376+ logger .warn (
377+ "Project [{}] has [{}] GCS client settings, but [{}] is usable due to missing credentials for clients {}" ,
378+ project .id (),
379+ allClientSettings .size (),
380+ clientSettings .size (),
381+ Sets .difference (allClientSettings .keySet (), clientSettings .keySet ())
382+ );
383+ }
385384 updatedPerProjectClients .put (project .id (), new PerProjectClientsHolder (clientSettings ));
386385 }
387386 }
You can’t perform that action at this time.
0 commit comments