Skip to content

Get hidden indices stats in GET _cat/shards #86601

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

Merged

Conversation

DaveCTurner
Copy link
Contributor

Passes a permissive IndicesOptions to the indices stats request used
within GET _cat/shards so that it retrieves stats for hidden indices
by default.

Also passes the same IndicesOptions to the cluster state request so
that the two requests get consistent sets of indices.

Also parallelises the two requests since there's no dependency between
them.

Closes #84656

Also relates #32238 since the more permissive IndicesOptions used here
permits closed indices, which means GET _cat/shards will not throw an
exception in security-enabled clusters containing closed indices behind
aliases.

Passes a permissive `IndicesOptions` to the indices stats request used
within `GET _cat/shards` so that it retrieves stats for hidden indices
by default.

Also passes the same `IndicesOptions` to the cluster state request so
that the two requests get consistent sets of indices.

Also parallelises the two requests since there's no dependency between
them.

Closes elastic#84656

Also relates elastic#32238 since the more permissive `IndicesOptions` used here
permits closed indices, which means `GET _cat/shards` will not throw an
exception in security-enabled clusters containing closed indices behind
aliases.
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label May 10, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @DaveCTurner, I've created a changelog YAML for you.

@DaveCTurner
Copy link
Contributor Author

I'm unclear on the precise BwC consequences of this change. I hope it's ok given that _cat APIs generally have weaker guarantees, but this needs care in reviews.

@sethmlarson sethmlarson added the Team:Clients Meta label for clients team label May 10, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/clients-team (Team:Clients)

@DaveCTurner DaveCTurner added the Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. label May 10, 2022
sethmlarson
sethmlarson previously approved these changes May 10, 2022
Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

LGTM from an API perspective

@DaveCTurner DaveCTurner dismissed sethmlarson’s stale review May 10, 2022 13:07

Thanks Seth, I'm dismissing this just so it's not marked as ready-to-merge in my list.

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, I consider this more on the bugfix side and I don't think we should be concerned about the behavior change.

@DaveCTurner DaveCTurner merged commit 326bb25 into elastic:master May 11, 2022
@DaveCTurner DaveCTurner deleted the 2022-05-10-cat-shards-hidden-indices branch May 11, 2022 06:50
@DaveCTurner
Copy link
Contributor Author

Thanks both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/CAT APIs Text APIs behind /_cat Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. Team:Clients Meta label for clients team Team:Data Management Meta label for data/management team v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GET _cat/shards returns partial data for hidden indices
5 participants