-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2 migration algorithm docs for rewriting saved object id's #93002
Conversation
0c3c8c6
to
beb6b57
Compare
4895b3d
to
9f5a4a8
Compare
9f5a4a8
to
551d57c
Compare
to the same index. This version's migration has already been completed. Since | ||
the same version could have plugins enabled at any time that would introduce | ||
new transforms or mappings. | ||
→ `OUTDATED_DOCUMENTS_SEARCH` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add a diagram of transitions between states?
|
||
Atomically apply the `versionIndexReadyActions` using the _alias actions API. By performing the following actions we guarantee that if multiple versions of Kibana started the upgrade in parallel, only one version will succeed. | ||
|
||
1. verify that the current alias is still pointing to the source index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding examples for this section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noticed I got UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK mixed up with MARK_VERSION_INDEX_READY will revisit this section
|
||
## REINDEX_SOURCE_TO_TEMP_INDEX | ||
### Next action | ||
`transformRawDocs` + `bulkIndexTransformedDocuments` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a directly related question: Is space a part of SO id still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it is, but in 8.x all saved objects will become "share-aware" (I think that's the terminology we're using) which means we will use this algorithm plus the work in #80945 to rewrite their id's and remove the space out of the id.
|
||
## OUTDATED_DOCUMENTS_TRANSFORM | ||
### Next action | ||
`transformRawDocs` + `bulkOverwriteTransformedDocuments` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the REINDEX_SOURCE_TO_TEMP_INDEX
step, we transform all the known SO types. On this step, we transform outdated docs that haven't been processed on REINDEX_SOURCE_TO_TEMP_INDEX
. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a brief description under CLONE_TEMP_TO_TARGET
but I expanded that a little bit and moved it under OUTDATED_DOCUMENTS_SEARCH
|
||
## OUTDATED_DOCUMENTS_TRANSFORM | ||
### Next action | ||
`transformRawDocs` + `bulkOverwriteTransformedDocuments` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are broken down into two separate steps to handle #90279
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will need to update the docs either in #90279 or right after
…93002) * Document v2 migration algorithm using control state names from source code * v2 migrations support for rewriting document _id's * Minor edits and clarifications * Fix markdown formatting * Review comments: improve algorithm description * add WAIT_FOR_YELLOW_SOURCE step Co-authored-by: restrry <restrry@gmail.com> # Conflicts: # rfcs/text/0013_saved_object_migrations.md
…109472) * Document v2 migration algorithm using control state names from source code * v2 migrations support for rewriting document _id's * Minor edits and clarifications * Fix markdown formatting * Review comments: improve algorithm description * add WAIT_FOR_YELLOW_SOURCE step Co-authored-by: restrry <restrry@gmail.com> # Conflicts: # rfcs/text/0013_saved_object_migrations.md
…93002) * Document v2 migration algorithm using control state names from source code * v2 migrations support for rewriting document _id's * Minor edits and clarifications * Fix markdown formatting * Review comments: improve algorithm description * add WAIT_FOR_YELLOW_SOURCE step Co-authored-by: restrry <restrry@gmail.com> # Conflicts: # rfcs/text/0013_saved_object_migrations.md
…109475) * Document v2 migration algorithm using control state names from source code * v2 migrations support for rewriting document _id's * Minor edits and clarifications * Fix markdown formatting * Review comments: improve algorithm description * add WAIT_FOR_YELLOW_SOURCE step Co-authored-by: restrry <restrry@gmail.com> # Conflicts: # rfcs/text/0013_saved_object_migrations.md
Summary
The saved object migrations RFC had documentation for the v2 migrations algorithm, but when implementing it some steps were divided into two so it's no longer straightforward to compare the documentation with the implementation. This PR adds documentation that uses the same control state names as the source code to make it easier to compare.
beb6b57 changes the current algorithm to support rewriting saved object id's to address #86247
Checklist
Delete any items that are not applicable to this PR.
For maintainers