[ZDT] create aliases during initial index creation #179783
Labels
Feature:Migrations
startup-time
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
At the moment, we're creating the index and and aliases in different steps, respectively
CREATE_TARGET_INDEX
andUPDATE_ALIASES
.This was done for simplicity's sake, to keep the index update logic into a single step, given we want to also check/update alias for subsequent migrations (when the indices are already present)
However, for performance's sake, we should now try to optimize our workflow, and have the create operation performed during
CREATE_TARGET_INDEX
also create the aliases, to avoid one unecessary roundtrip.Tech pointers
Generating the alias actions that are exposed on
state.aliasActions
:kibana/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/zdt/model/stages/init.ts
Lines 110 to 116 in 98efb6a
The action that should now use those alias actions:
kibana/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/zdt/next.ts
Lines 64 to 70 in 53173f1
Note that
getAliasActions
technically can return any kind ofAliasAction
(including deletions), even if today we're only doing additions (and we will likely only do addition for index creation anyway), but we still need some kind of logic to decide if we can extract the alias names from theAliasActions
listThe text was updated successfully, but these errors were encountered: