Skip to content

[BUG] Concurrent index deletion during ongoing search request throws 5xx error #12371

@jainankitk

Description

@jainankitk

Describe the bug

If an index gets deleted while the shard search request has not been sent, the overall search request results in 5xx error. That should not be the case, since the customer has explicitly deleted index and not an internal server error. No index/shard, no search results/delete by query

Related component

Search

To Reproduce

  1. Create 200 indices on a node
  2. Start expensive search request for all the indices
  3. Delete the indices on which request has not started execution yet
  4. The search request eventually results in 5xx error

Expected behavior

During the search execution, only consider shard result as failure if the exception is anything other than index/shard not found. Eventually, if all the shards within search request do not return any results (probability of this is low), the 200 OK response can be changed to 404, but we should never be throwing 5xx.

Additional Details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Indexing & SearchSearchSearch query, autocomplete ...etcbugSomething isn't working

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions