-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ZDT migration] Don't run document migration on non-migrator nodes (#…
…156345) ## Summary Part of #150309 A few enhancements to the ZDT migration algorithm. ### 1. Run the 'expand' phase (and only this one) on non-migrator nodes Given our latests changes to the way we want the algo to function, the non-migrator nodes will have to run the 'expand' (schema expansion) phase. However, the document migration phase will have to be run by the migrator node exclusively. Note: because it was required for integration tests, a new `migration.zdt.runOnNonMigratorNodes` option was introduced to change this behavor and have non-migrator nodes ignore this limitation. ### 2. Don't terminate during `INIT` if higher mapping versions are found Any mapping changes are upward compatible, meaning that we can safely no-op instead of failing of the mapping version check result is `lesser`. This change is required now that mapping updates will be performed before all nodes of the previous version are shut down (and is also required for rollbacks) ### 3. Perform a version check during `DOCUMENTS_UPDATE_INIT` We were always executing the full doc update cycle when entering this stage. We're now performing a version check similar to what was done during `INIT`. If the check result returns: - `greater`: we perform the document migration (as it was done before this change) - `equal`: we skip the document migration - `lesser`: we skip the document migration (**NOTE**: this may change later depending on how we handle rollbacks) - `conflict`: we terminate with a failure, as done during `INIT` --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
87ab62e
commit 8f34b96
Showing
45 changed files
with
739 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.