Skip to content

Conversation

ogprakash
Copy link

@ogprakash ogprakash commented Sep 1, 2025

Description

This PR Changes the behaviour of the cluster health API when a non-existing-index is requested.
Previously, the API would wait until timeout and returns RED status of cluster
With this change, the API now immediately throws IndexNotFoundException, which maps to HTTP 404.

Related Issues

Resolves #19022

Check List

  • Functionality includes testing.
    • Updated ClusterHealthIT to expect IndexNotFoundException instead of RED for missing indices.
    • Updated/added unit tests in ClusterStateHealthTests to validate immediate 404 behavior.
  • API changes companion pull request created, if applicable. (N/A, no REST spec change)
  • Public documentation issue/PR created, if applicable. (Can be added if maintainers request doc update)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ogprakash ogprakash requested a review from a team as a code owner September 1, 2025 16:33
@github-actions github-actions bot added bug Something isn't working Other labels Sep 1, 2025
Copy link
Contributor

github-actions bot commented Sep 1, 2025

❌ Gradle check result for 54fc3a9: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@ogprakash ogprakash force-pushed the bugfix/cluster-health-404 branch from 54fc3a9 to 7f3bbfd Compare September 1, 2025 17:15
Copy link
Contributor

github-actions bot commented Sep 1, 2025

❌ Gradle check result for 7f3bbfd: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Other
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] 408 response with incorrect information returned from GET _cluster/health/<index> given nonexistent index
1 participant