with default migration.strategy: alias new index will be created during migration and new alias will point on it.
But old alias not removed and in ES will be few indexes with same aliases.
in the code of ElasticSearchAdminService missed the delete logic execution. But all preparation done:
void pointAliasTo(String alias, String index, Integer version = null) {
index = versionIndex(index, version)
LOG.debug "Creating alias ${alias}, pointing to index ${index} ..."
String oldIndex = indexPointedBy(alias)
elasticSearchHelper.withElasticSearch { RestHighLevelClient client ->
if (oldIndex && oldIndex != index) {
LOG.debug "Index used to point to ${oldIndex}, removing ..."
new IndicesAliasesRequest.AliasActions(IndicesAliasesRequest.AliasActions.Type.REMOVE)
.index(oldIndex)
.alias(alias)
}
IndicesAliasesRequest request = new IndicesAliasesRequest()
IndicesAliasesRequest.AliasActions aliasAction =
new IndicesAliasesRequest.AliasActions(IndicesAliasesRequest.AliasActions.Type.ADD)
.index(index)
.alias(alias)
request.addAliasAction(aliasAction)
LOG.debug "Create alias -> index: ${index}; alias: ${alias}"
client.indices().updateAliases(request, RequestOptions.DEFAULT)
}
}
AliasActions created but not executed. Is a mistake of expected behaviour?
In case of mistake I can provide a PR with a fix
Expected Behavior
with default migration.strategy: alias new index will be created during migration and new alias will point on it. But old alias not removed and in ES will be few indexes with same aliases.
in the code of ElasticSearchAdminService missed the delete logic execution. But all preparation done:
AliasActions created but not executed. Is a mistake of expected behaviour? In case of mistake I can provide a PR with a fix
Actual Behaviour
No response
Steps To Reproduce
No response
Environment Information
Version of plugin 3.0.0-snapshot
Example Application
No response
Version
4