From 282974215c00afa5dfad164a3c87499f71b6eb2e Mon Sep 17 00:00:00 2001 From: Robin Neatherway Date: Mon, 12 Feb 2018 23:55:17 +0000 Subject: [PATCH] MetaDataIndexAliasesService wrong get type (#28614) A get of the wrong type would always have returned null so these indices would have been inserted into the map repeatedly. --- .../cluster/metadata/MetaDataIndexAliasesService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexAliasesService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexAliasesService.java index 37831f977ae..0c38371bdc9 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexAliasesService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexAliasesService.java @@ -133,7 +133,7 @@ public class MetaDataIndexAliasesService extends AbstractComponent { Function indexLookup = name -> metadata.get(name); aliasValidator.validateAlias(alias, action.getIndex(), indexRouting, indexLookup); if (Strings.hasLength(filter)) { - IndexService indexService = indices.get(index.getIndex()); + IndexService indexService = indices.get(index.getIndex().getName()); if (indexService == null) { indexService = indicesService.indexService(index.getIndex()); if (indexService == null) {