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

Async Search Status return expired #66114

Closed
mayya-sharipova opened this issue Dec 9, 2020 · 4 comments
Closed

Async Search Status return expired #66114

mayya-sharipova opened this issue Dec 9, 2020 · 4 comments
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Comments

@mayya-sharipova
Copy link
Contributor

mayya-sharipova commented Dec 9, 2020

When async search is expired we return NOT found 404 even if it still available in task manager or .async-search index.

Kibana team requested if it would be possible instead to return expired status in this case.
For example, a response can be:

{
  "id" : <id>,
  "is_expired" : true,
  "is_running" : false,
  "is_partial" : true,
  "start_time_in_millis" : 1583945890986,
  "expiration_time_in_millis" : 1584377890986,
  "_shards" : {
      "total" : 562,
      "successful" : 188,
      "skipped" : 0,
      "failed" : 0
  }
}

Related to: #62947

cc: @lizozom

@mayya-sharipova mayya-sharipova added >enhancement :Search/Search Search-related issues that do not fall into other categories labels Dec 9, 2020
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Dec 9, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@mayya-sharipova
Copy link
Contributor Author

First, there is only a short window when searches are expired but not yet deleted, we potentially can display their status as expired. But after that window they will deleted and we don't have a way to retrieve them anymore as we don't store expired searches.

@lizozom A a bigger question that we were wondering, does Kibana itself store all async search IDs that it fires? If it does then the only reason the status for the stored ID is returned "NOT FOUND" is because it is expired (or because it was explicitly deleted). Thus, if Kibana stores all the async search IDs, we don't see the need to add expiration status. Please let us know what you think @lizozom

@lizozom
Copy link

lizozom commented Dec 15, 2020

We can derive the status if needed, I just wanted to make sure I wasn't doing duplicated work.
Feel free to close this issue.

@mayya-sharipova
Copy link
Contributor Author

@lizozom Thank you for the comment. I will be closing this issue then, as it is better to do this from Kibana, not from elasticsearch, as elasticsearch only temporarily stores expired searches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

3 participants