-
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 migrations needs to support re-writing document _id's to support saved-objects in multiple spaces #86247
Labels
Feature:Saved Objects
project:ResilientSavedObjectMigrations
Reduce Kibana upgrade failures by making saved object migrations more resilient
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Comments
rudolf
added
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Feature:Saved Objects
project:ResilientSavedObjectMigrations
Reduce Kibana upgrade failures by making saved object migrations more resilient
labels
Dec 17, 2020
Pinging @elastic/kibana-core (Team:Core) |
9 tasks
This will hopefully also solve #91143 |
9 tasks
Updated the description based on #92933 (comment) |
v2 migrations fixed #56731 by accident, but if we again move to a model where we read-transform-write all documents, we will likely bump into that issue again. |
We should also keep #93155 in mind |
@mshustov What else needs to be done for this issue? |
6 tasks
rudolf
changed the title
Resilient migrations needs to support re-writing document _id's to support saved-objects in multiple spaces
v2 migrations needs to support re-writing document _id's to support saved-objects in multiple spaces
Aug 24, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Saved Objects
project:ResilientSavedObjectMigrations
Reduce Kibana upgrade failures by making saved object migrations more resilient
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
The algorithm described in https://github.com/elastic/kibana/blob/master/rfcs/text/0013_saved_object_migrations.md and implemented in #78413 does not allow migration functions to re-write document _id's.
Rewriting document _id's is required for enabling saved objects to be shared across multiple spaces in 8.0 because we need to remove the object's space from the _id. Similarly saved object types are also embedded in the _id so when a saved object type is renamed we need to change the _id to reflect the new type name.
Rewriting a document _id can only happen during a scripted reindex operation so the two potential solutions are:
There is a big risk that (2) would not scale well for millions of saved objects. Although we don't have any current use cases for plugins creating that many saved objects, making migrations future-proof would justify the additional work of adding uuidv5 to painless. Before deciding on the approach to follow we should do some benchmarking to see how well they scale for e.g. 50 million saved objects.
migrations.enableV2=false, migrations.batchSize=x
but to exclude the overhead of transforming documents, we should ensure that all but one document are already on the latestmigrationVersion
)The text was updated successfully, but these errors were encountered: