elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.12k stars 24.83k forks source link

EQL: correct the request-wide timeout handling #74815

Open bpintea opened 3 years ago

bpintea commented 3 years ago

Currently EQL user-request timeout isn't effectively covering the entire process leading to a response, but rather individual internal requests used to build the sequences; this can lead to issues with both user's response not being generated orderly, as well as the cluster doing work that's eventually discarded.

The issue is raised to correct this behaviour.

elasticmachine commented 3 years ago

Pinging @elastic/es-ql (Team:QL)

Luegg commented 3 years ago

It looks like that the canonical way to handle request timeouts is to let the client close the connection when it is no longer interested in the response. The mechanism has been introduced in https://github.com/elastic/elasticsearch/pull/43332.

No other APIs that I'm aware of (expect _sql to some degree) support request timeouts in the sense of timing out the request on the server side.

So instead of adding a request_timeout parameter we have to primarily ensure that all searches started by EQL are canceled when the connection is closed. This is currently not the case.

bpintea commented 3 years ago

So instead of adding a request_timeout parameter we have to primarily ensure that all searches started by EQL are canceled when the connection is closed.

That would seem like a legit solution.

elasticsearchmachine commented 9 months ago

Pinging @elastic/es-analytical-engine (Team:Analytics)