Skip to content

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Sep 22, 2025

Currently, we incorrectly use the initial keep-alive value when creating the document for the async response. Instead, we should use the latest expiration from the search task, which is updated by get requests.

Closes #135169

@elasticsearchmachine
Copy link
Collaborator

Hi @dnhatn, I've created a changelog YAML for you.

storeResults(
searchTask,
new StoredAsyncResponse<>(response, threadPool.absoluteTimeInMillis() + keepAlive.getMillis()),
new StoredAsyncResponse<>(response, searchTask.getExpirationTimeMillis()),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines are the main fix.

@dnhatn dnhatn marked this pull request as ready for review September 22, 2025 17:46
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Sep 22, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@dnhatn dnhatn added the auto-backport Automatically create backport pull requests when merged label Sep 22, 2025
@dnhatn
Copy link
Member Author

dnhatn commented Sep 22, 2025

Thanks Nik!

@dnhatn dnhatn merged commit 43f7c0d into elastic:main Sep 22, 2025
34 checks passed
@dnhatn dnhatn deleted the fix-async-expiration branch September 22, 2025 22:49
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.19
9.1

dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Sep 22, 2025
Currently, we incorrectly use the initial keep-alive value when creating 
the document for the async response. Instead, we should use the latest
expiration from the search task, which is updated by get requests.

Closes elastic#135169
dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Sep 22, 2025
Currently, we incorrectly use the initial keep-alive value when creating 
the document for the async response. Instead, we should use the latest
expiration from the search task, which is updated by get requests.

Closes elastic#135169
Copy link

atlassian bot commented Sep 22, 2025

🔗 Link your GitHub account to Atlassian

To enable Code Reviewer, please link your GitHub account to your Atlassian account.

Click here to connect your accounts

This is a one-time setup that takes less than a minute.

elasticsearchmachine pushed a commit that referenced this pull request Sep 22, 2025
Currently, we incorrectly use the initial keep-alive value when creating 
the document for the async response. Instead, we should use the latest
expiration from the search task, which is updated by get requests.

Closes #135169
elasticsearchmachine pushed a commit that referenced this pull request Sep 22, 2025
Currently, we incorrectly use the initial keep-alive value when creating 
the document for the async response. Instead, we should use the latest
expiration from the search task, which is updated by get requests.

Closes #135169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.19.5 v9.1.5 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ES|QL] When requesting GET /_query/async/{id}?keep_alive={time} while the query is running keep_alive is ignored
3 participants