-
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
Allow migrations to split documents into new document type #26602
Comments
Pinging @elastic/kibana-operations |
Note, this issue is considered a potential blocker for BeatsCM going GA. This issue is also a blocker for @elastic/uptime |
@mattapperson Could clarify a bit with an example of what you'd like the end result to look like? That would help us understand a bit more what you need to accomplish. Also are these saved objects in the .kibana index or is there a separate index for BeatsCM data? |
Pinging @elastic/kibana-platform (Team:Platform) |
The simplest implementation would be to change the migration transform function to be able to return an array of objects instead of a single object. Because it's possible for an ID conflict, the migration transform function won't be able to assign ID's to the new documents. This means it's possible for the new sub-type documents to have a reference to the parent, but not the other way around as in your example. We will need to consider how we apply migrations to the newly split out documents. If a later version of Kibana adds a migration for the sub-type we need to apply this migration to newly split out documents when Kibana starts up, but also when importing saved objects. Related: #34996 |
We introduced the |
It's only Elasticsearch that can guarantee uniqueness, any generated id might conflict. But even though this is theoretically possible it's practically impossible. Since there won't be any data loss, we can ignore this case and simply throw a fatal if it ever occurs. |
With a valid UUID generator, That's approximatively the same risk as a git commit hash conflict. Still think that exposing the id generator would be preferable, as that would keep this responsibility inside core. |
Closing this as we're not aware of any plugins requiring this functionality at the moment. |
At the moment BeatsCM has a document type of
tag
that is shaped like this:where
configs
is an array of objects. We would like to take that array of objects, with each create it's own document of a newconfig_block
type, and on the tag the data came from have an array ofconfig_block
IDsThe text was updated successfully, but these errors were encountered: