-
Notifications
You must be signed in to change notification settings - Fork 25.3k
fix(esql): refresh keep_alive TTL on async query GET requests #130673
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
base: main
Are you sure you want to change the base?
fix(esql): refresh keep_alive TTL on async query GET requests #130673
Conversation
@kertal can you check? |
thx @emreyalvac not sure who's the best to review this, since I just reported it , and it's something we need in Kibana. dear @elasticsearch-esql , can you help me (or know who can take care of it, thx) . If this is the solution I assume it needs at least one test to cover it |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
buildkite test this |
@emreyalvac thank you for providing a fix in this PR. Would you mind looking into the test failures and, also, add a test for this fix? |
CC @ChrisHegarty if you have a quicker turnaround on this one 🙏 . |
@elasticmachine update branch |
I locally hacked @emreyalvac did you reproduce and verity the change? |
buildkite test this |
One can set a keep-alive time through the initial query, and this works. I'm not sure that the keep-alive update over async get was ever implemented. It's been more than a year since I wrote this code, and it has changed quite a bit. I think that there is some more work to be done if we wanna support this - more than is in this PR. |
Summary
Fixes a bug in the ESQL async query API where updating the
keep_alive
value via aGET /_query/async/{id}?keep_alive=...
request did not properly extend the lifetime of the async result, causing unexpected 404s after the original TTL expired.Details
keep_alive
duration specified in the POST request was honored, but follow-up GET requests with a newkeep_alive
value failed to refresh the TTL.keep_alive
value is passed in the follow-up GET request, it will properly update the expiration time of the async result.How to Reproduce (Before Fix)
keep_alive
, e.g.15s
.GET /_query/async/{id}?keep_alive=60s
After Fix
keep_alive
value provided in the GET call.Related
Closes: #130619