-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Add migrations.discardCorruptObjects flag #132984
Add migrations.discardCorruptObjects flag #132984
Conversation
…18-discard-corrupts-objects
…com/gsoldevila/kibana into kbn-129018-discard-corrupts-objects
…com/gsoldevila/kibana into kbn-129018-discard-corrupts-objects
}, | ||
logging: { | ||
appenders: { | ||
file: { | ||
type: 'file', | ||
fileName: logFilePath, | ||
layout: { | ||
type: 'json', | ||
type: 'pattern', |
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.
Need to change this back to 'json'
Pinging @elastic/kibana-core (Team:Core) |
@elasticmachine merge upstream |
@@ -85,6 +85,16 @@ DELETE .kibana_7.12.0_001/_doc/marketing_space:dashboard:e3c5fc71-ac71-4805-bcab | |||
+ | |||
The dashboard with the `e3c5fc71-ac71-4805-bcab-2bcc9cc93275` ID that belongs to the `marketing_space` space **is no longer available**. | |||
|
|||
You can configure {kib} to automatically discard all corrupt objects and transform errors that occur during a migration. When setting the configuration option `migrations.discardCorruptObjects`, {kib} will ignore the conflicting objects and proceed with the migration. |
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.
You can configure {kib} to automatically discard all corrupt objects and transform errors that occur during a migration. When setting the configuration option `migrations.discardCorruptObjects`, {kib} will ignore the conflicting objects and proceed with the migration. | |
You can configure {kib} to automatically discard all corrupt objects and transform errors that occur during a migration. When setting the configuration option `migrations.discardCorruptObjects`, {kib} will delete the conflicting objects and proceed with the migration. |
I think we should use drop/delete/discard to make it clear that for all intents and purposes the data will be lost.
@@ -1971,7 +1971,12 @@ | |||
} | |||
}, | |||
"type": { | |||
"type": "keyword" | |||
"type": "text", |
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 changes should probably be reverted?
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.
Oops, rebase issue, good catch!
migrations.discardCorruptObjects: "8.4.0" | ||
-------------------------------------------- | ||
|
||
**WARNING:** These objects will be kept in the old indices for reference, but they will no longer be used by the system. Thus, it is recommended that you first review the list of conflicting objects in the logs. |
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 haven't had a lot of discussion around it, but I'm leaning towards, in the future, just deleting the old indices immediately after a successful migration. Some more context here #126672 (comment)
Also given that it's almost impossible for a user to safely restore from an old index after the migration completed successfully I think it's better to just tell users that the data will be lost. I still think it's useful to warn users to carefully review the documents.
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.
Makes sense, I'll update the warning message then.
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.
Implementation seems fine to me
@@ -181,3 +215,36 @@ function createRoot() { | |||
} | |||
); | |||
} | |||
|
|||
async function rootPrebotAndSetup(root: Root) { |
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.
NIT: typo: rootPrebotAndSetup
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
Part of the fix for #129018, introduces a new flag for the migration logic to ignore saved objects with unknown type:
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers