Corrupt Saved Object documents can cause a migration every time Kibana starts up #65612
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Saved Objects
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
When starting up, Kibana scans the
.kibana
alias/index for documents that require a migration. For each document being migrated, we do a basic validation that checks if the type and namespace in the id matches the type and namespace fields. If these don't match, we don't apply the migration and just write the document as-is. Because the document's migrationVersion wasn't bumped, the next time Kibana starts up it will again see outdated documents and start a new migration.kibana/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts
Line 41 in ea7c78d
Because the Saved Objects API ensures that written documents are always valid, this will only affect users which write saved object documents directly into Elasticsearch instead of using the Kibana API's.
As a first step we can add logging to highlight this case to users.
The text was updated successfully, but these errors were encountered: