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

[Discuss][Search Sessions] Synchronizing async_search keepslive updates #88599

Closed
lizozom opened this issue Jan 18, 2021 · 2 comments
Closed
Labels
blocker bug Fixes for quality problems that affect the customer experience Feature:Search Querying infrastructure in Kibana Project:AsyncSearch Background search, partial results, async search services. v7.12.0

Comments

@lizozom
Copy link
Contributor

lizozom commented Jan 18, 2021

In order to avoid having "abandoned" searches that keep running, after a user has closed Kibana, In #73712, we started extending the keep_alive of async_search requests by 1m every time we poll them.

However, with the release of Search Sessions coming upon us, this workaround creates a problem. When a Search Session is being stored, we need to extend the expiration of the searches it contains, creating a potential race condition. When the race condition happens, we would save a Search Session and then some of the searches in it will expire, and show errors when restoring.

image

@jimczi and I have discussed a couple of solutions:

  • Allowing the expiration to have a script in it, that will apply the keepalive update only if the current expiration time is near
  • Supporting separate parameters for the actual keep alive and for the polling behavior.

And now the Elasticsearch need to decide how they prefer to work around this problem.

@lizozom lizozom added bug Fixes for quality problems that affect the customer experience blocker Feature:Search Querying infrastructure in Kibana Project:AsyncSearch Background search, partial results, async search services. v7.12.0 labels Jan 18, 2021
@lizozom lizozom changed the title [Discuss][Search Sessions] Synchronizing async_search keepslives [Discuss][Search Sessions] Synchronizing async_search keepslive updates Jan 18, 2021
@dnhatn
Copy link
Member

dnhatn commented Jan 25, 2021

I've merged elastic/elasticsearch#67877 that will always extend the keep_alive; hence, it never goes backward. I think we are good here.

@lizozom
Copy link
Contributor Author

lizozom commented Feb 9, 2021

Resolved by #89570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience Feature:Search Querying infrastructure in Kibana Project:AsyncSearch Background search, partial results, async search services. v7.12.0
Projects
None yet
Development

No branches or pull requests

2 participants