Skip to content

Commit f08fbe4

Browse files
committed
Rename
1 parent e966efe commit f08fbe4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageService.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,24 +364,24 @@ public void applyClusterState(ClusterChangedEvent event) {
364364
// Skip project clients that have no credentials configured. This should not happen in serverless.
365365
// But it is safer to skip them and is also a more consistent behaviour with the cases when
366366
// project secrets are not present.
367-
final var clientSettings = allClientSettings.entrySet()
367+
final var clientSettingsWithCredentials = allClientSettings.entrySet()
368368
.stream()
369369
.filter(entry -> entry.getValue().getCredential() != null)
370370
.collect(Collectors.toUnmodifiableMap(Map.Entry::getKey, Map.Entry::getValue));
371371

372372
// TODO: If performance is an issue, we may consider comparing just the relevant project secrets for new or updated clients
373373
// and avoid building the clientSettings
374-
if (newOrUpdated(project.id(), clientSettings)) {
375-
if (allClientSettings.size() != clientSettings.size()) {
374+
if (newOrUpdated(project.id(), clientSettingsWithCredentials)) {
375+
if (allClientSettings.size() != clientSettingsWithCredentials.size()) {
376376
logger.warn(
377377
"Project [{}] has [{}] GCS client settings, but [{}] is usable due to missing credentials for clients {}",
378378
project.id(),
379379
allClientSettings.size(),
380-
clientSettings.size(),
381-
Sets.difference(allClientSettings.keySet(), clientSettings.keySet())
380+
clientSettingsWithCredentials.size(),
381+
Sets.difference(allClientSettings.keySet(), clientSettingsWithCredentials.keySet())
382382
);
383383
}
384-
updatedPerProjectClients.put(project.id(), new PerProjectClientsHolder(clientSettings));
384+
updatedPerProjectClients.put(project.id(), new PerProjectClientsHolder(clientSettingsWithCredentials));
385385
}
386386
}
387387

0 commit comments

Comments
 (0)