Join GitHub today
Only clear open search ctx if the index is delete or closed via API #12199
A change in #12116 introduces closing / cleaning of search ctx even if
there where some failures related to this on CI here:
A change in #12116 introduces closing / cleaning of search ctx even if the index service was closed due to a relocation of it's last shard. This is not desired since in that case it's fine to serve the pending requests from the relocated shard. This commit adds an extra check to ensure that the index is either removed (delete) or closed via API.