Skip to content

propagate trino query timeout and cancellation to ElasticSearch#28941

Open
lovasoa wants to merge 1 commit into
trinodb:masterfrom
lovasoa:elasticsearch-cancellation
Open

propagate trino query timeout and cancellation to ElasticSearch#28941
lovasoa wants to merge 1 commit into
trinodb:masterfrom
lovasoa:elasticsearch-cancellation

Conversation

@lovasoa
Copy link
Copy Markdown

@lovasoa lovasoa commented Mar 31, 2026

Description

This makes search, searchScroll, and clearScroll cancellable in the ElasticSearch plugin.
The old code called the synchronous elasticsearch client methods that run queries to completion independently of what happens on the calling thread.

Additional context and related issues

This fixes #28927 and adds a regression test.

Release notes

suggested text:

## Fixes
* ElsaticSearch connector: When a query times out or is cancelled in trino, the cancellation now propagates to elasticsearch. Trino used to run the elasticsearch query to completion in the background. ({issue}`28927`)

I signed the CLA and sent it to cla@trino.io

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 31, 2026

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@github-actions github-actions Bot added the elasticsearch Elasticsearch connector label Mar 31, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56f2a25600

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

lovasoa added a commit to lovasoa/trino that referenced this pull request Mar 31, 2026
lovasoa added a commit to lovasoa/trino that referenced this pull request Mar 31, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 31, 2026

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9be2980e9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lovasoa lovasoa force-pushed the elasticsearch-cancellation branch from 9be2980 to 98e5c32 Compare March 31, 2026 16:28
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 31, 2026

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@lovasoa lovasoa force-pushed the elasticsearch-cancellation branch from 98e5c32 to 15d8c49 Compare March 31, 2026 19:09
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 31, 2026

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@lovasoa lovasoa force-pushed the elasticsearch-cancellation branch from 15d8c49 to a9c3671 Compare March 31, 2026 19:19
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 31, 2026

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 1, 2026

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

1 similar comment
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 1, 2026

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@lovasoa lovasoa force-pushed the elasticsearch-cancellation branch from ac1d84e to 2b2513d Compare April 1, 2026 14:37
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 1, 2026

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@lovasoa
Copy link
Copy Markdown
Author

lovasoa commented Apr 3, 2026

@ebyhr , @Praveen2112, if you have time, could you please have a look at this PR too ?

To be clear :

@github-actions
Copy link
Copy Markdown

This pull request has gone a while without any activity. Ask for help on #core-dev on Trino slack.

@github-actions github-actions Bot added the stale label Apr 24, 2026
@github-actions github-actions Bot removed the stale label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

elasticsearch Elasticsearch connector

Development

Successfully merging this pull request may close these issues.

Cancelled Trino queries keep running on Elasticsearch

1 participant