opensearch-project / opensearch-project/sql

[FEATURE] Per-request timeouts

Open
#4,886 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
176
Forks
229
Avg merge
2d 21h
Merged PRs (30d)
43

Description

Is your feature request related to a problem?
#4857 introduces a global timeout setting for all Calcite PPL queries. This helps address the major concern from #4842 on overwhelming a cluster with hour-long query times in some types of slow loops. But the global setting isn't generally applicable to every query: some specific queries may want to go longer, others may want to go shorter.

What solution would you like?
In addition to the global timeout setting from #4857, also support a per-request timeout.

$ curl -XPOST ... --data '{
  "query": "...",
  "timeout": 60
}'

This would set a timeout of 60 seconds, regardless of the global cluster setting.

A zero or negative timeout would mean no timeout.

What alternatives have you considered?
Just stick with the global timeout option. Works well enough for managed clusters, but is an issue with Serverless.

Do you have any additional context?
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the global timeout implementation introduced by #4857 and the request-handling path for the JSON query body. Support the per-request timeout, including zero or negative values meaning no timeout, and verify that it overrides the global setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.