Skip to content
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

[Upgrade Assistant] Reindexing optimizations #205055

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

afharo
Copy link
Member

@afharo afharo commented Dec 20, 2024

Summary

Upgrade assistant sets recommended index settings for faster reindexing operations, and reverts them after completion.

Resolves #201605.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@afharo afharo added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes Feature:Upgrade Assistant backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 20, 2024
@afharo afharo self-assigned this Dec 20, 2024
@afharo afharo requested a review from a team as a code owner December 20, 2024 17:02
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #33 / aiops log rate analysis in cases attaches log rate analysis to a case

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
upgradeAssistant 158.8KB 159.7KB +885.0B

cc @afharo

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and this works as expected. Great work @afharo , I think you covered everything. Left a minor comment about a test case.

});

if (!settingsResponse.acknowledged) {
throw error.cannotCreateIndex(`The original index settings could not be restored.`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to include some more info from the settingsResponse in this case? Could be useful for debugging in future scenarios.


// The new index was created
expect(indexSummary[newIndexName]).to.be.an('object');
// The original index name is aliased to the new one
expect(indexSummary[newIndexName].aliases?.dummydata).to.be.an('object');
// Verify mappings exist on new index
expect(indexSummary[newIndexName].mappings?.properties).to.be.an('object');
// Verify settings exist on new index
expect(indexSummary[newIndexName].settings).to.be.an('object');
expect({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this archive have an index with non-default settings? Would be nice to have a test case with default settings and one with explicit settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Upgrade Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UA] Low hanging fruit to improve reindexing performance
3 participants