ClickHouse / ClickHouse/ClickHouse
Hanging s3() Query
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
### Company or project name
ClickHouse/pg_chdb
### Describe what's wrong
This query hangs forever:
```sql
SELECT * FROM s3(
's3://localhost:20306/bucket/prefix/file.csv',
'key',
'secret',
'big fat token',
'parquet',
'id Int64',
'lz4'
) SETTINGS date_time_output_format='iso', s3_request_timeout_ms = 1
```
Sending an interrupt doesn't help. Sending a second exits the client session. Changing `s3_request_timeout_ms` to `10` does not fix the issue, but changing it to `100` or `0` does.
### Does it reproduce on the most recent release?
Yes
### How to reproduce
Run this query:
```sql
SELECT * FROM s3(
's3://localhost:20306/bucket/prefix/file.csv',
'key',
'secret',
'big fat token',
'parquet',
'id Int64',
'lz4'
) SETTINGS date_time_output_format='iso', s3_request_timeout_ms = 1
```
### Expected behavior
It should error out after 1ms
### Error message and/or stacktrace
_No response_
### Related issues and pull requests
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start by reproducing the query against the s3() table function with s3_request_timeout_ms set to 1, 10, 100, and 0, and observe interruption behavior. Trace the timeout and interrupt handling for the S3 request; done means the query exits with an error after the configured timeout instead of hanging, while preserving the working behavior at 100 and 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100