Document and use migrations.batchSize
in v2 migrations
#93155
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 saved-object migrations v1 used the undocumented
migrations.batchSize
setting to control how many documents are migrated per batch. We found some utility in allowing users to increase this setting to deal with a large number of saved-objects that should be migrated.However, the saved-object migrations v2 don't use this setting and they're currently hard-coded to migrate 1000 saved-objects at a time. Per @rudolf's suggestion, we should document this setting and consume it for v2 migrations.
Outdated old description
The default for `migrations.batchSize` was chosen a long time ago. We've continued to see issues with migrations run against Kibana system-indices that have a very large number of documents. One of the workarounds that have been employed is manually increasing the `migrations.batchSize` setting from `100` to `1000`. Should we consider increasing the default from `100` to `1000`?Conceptually, this will cause Kibana to consume 10x more heap during migrations. Do we have any idea how large these saved-objects are to determine the real impact this change would have?
Are there any other side-effects we should take into consideration?
The text was updated successfully, but these errors were encountered: