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

Cache index.hidden setting #78612

Merged

Conversation

DaveCTurner
Copy link
Contributor

We look up the value for index.hidden for every index every time we
build a new Metadata, which involves map lookups and string parsing
and so on and takes nontrivial time. This commit moves the value to a
field so the lookups are only needed if the index metadata changes.

Closes #77974

We look up the value for `index.hidden` for every index every time we
build a new `Metadata`, which involves map lookups and string parsing
and so on and takes nontrivial time. This commit moves the value to a
field so the lookups are only needed if the index metadata changes.

Closes elastic#77974
Copy link
Member

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM :D I was just about to build this myself.

@DaveCTurner
Copy link
Contributor Author

😁 yeah #78609 made me look at this again, turns out it's pretty easy

@DaveCTurner DaveCTurner added :Core/Infra/Core Core issues without another label >enhancement labels Oct 4, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Oct 4, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@DaveCTurner DaveCTurner added v7.16.0 auto-backport-and-merge auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) and removed auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Oct 4, 2021
@DaveCTurner DaveCTurner merged commit 9aef331 into elastic:master Oct 4, 2021
@DaveCTurner DaveCTurner deleted the 2021-10-04-cache-is-hidden-setting branch October 4, 2021 14:27
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 78612

DaveCTurner added a commit that referenced this pull request Oct 4, 2021
We look up the value for `index.hidden` for every index every time we
build a new `Metadata`, which involves map lookups and string parsing
and so on and takes nontrivial time. This commit moves the value to a
field so the lookups are only needed if the index metadata changes.

Closes #77974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >enhancement Team:Core/Infra Meta label for core/infra team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detecting hidden indices takes nontrivial time
5 participants