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

Inconsistent behavior of index stats API for closed indices vs closed indices with an alias matching the index pattern: index_closed_exception #100661

Closed
bczifra opened this issue Oct 11, 2023 · 2 comments
Labels
>bug needs:triage Requires assignment of a team area label

Comments

@bczifra
Copy link
Member

bczifra commented Oct 11, 2023

Elasticsearch Version

8.8.2

Installed Plugins

No response

Java Version

bundled

OS Version

Elastic Cloud

Problem Description

The index stats API returns an index_closed_exception if a closed index is behind an alias matching the wildcard index pattern, but returns without an exception if the closed index matches the wildcard index pattern but is not behind an alias matching the pattern.

Steps to Reproduce

When calling the Indices Stats API against a single, closed index:

PUT aliased_index

GET aliased_index/_stats

POST aliased_index/_close

GET aliased_index/_stats

the final call returns an index_closed_exception.

If we create a new index, then call _stats for those two indices, the API returns without an error:

PUT unaliased_index

GET unal*,ali*/_stats

However, if we now create an alias for that first index:

POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "aliased_index",
        "alias": "my-alias"
      }
    }
  ]
}

Then this call:

GET my*,unalias*/_stats

will return an index_closed_exception.

Logs (if relevant)

No response

@bczifra bczifra added >bug needs:triage Requires assignment of a team area label labels Oct 11, 2023
@bczifra
Copy link
Member Author

bczifra commented Oct 11, 2023

Related: #88752 and elastic/beats#36677

@DaveCTurner
Copy link
Contributor

I think this is a genuine issue, but I'm closing this as a duplicate of #32238.

@DaveCTurner DaveCTurner closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug needs:triage Requires assignment of a team area label
Projects
None yet
Development

No branches or pull requests

2 participants