ClickHouse / ClickHouse/clickhouse-go
Client sets max_execution_time, which is incompatible with read-only mode
- Dominant language
- Go
- Stars
- 3.3k
- Forks
- 680
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 14
Description
Here's where the setting is set:
https://github.com/ClickHouse/clickhouse-go/blob/c5bccc81430c7acf84c929470c8503d04c15fcf9/context.go#L238-L240
Here's where the time out is confiugred:
https://github.com/ClickHouse/clickhouse-go/blob/c5bccc81430c7acf84c929470c8503d04c15fcf9/clickhouse.go#L304-L305
Here's the error I'm getting:
```
failed to query server hello: failed to query server hello info: sendQuery: [HTTP 500] response body: "Code: 164. DB::Exception: Cannot modify 'max_execution_time' setting in readonly mode. (READONLY)
```
The only way to work around this currently is setting the dial timeout to less than 1s.
Contributor guide
Research direction
Start in context.go around lines 238-240 to inspect how max_execution_time is set, then read clickhouse.go around lines 304-305 for the timeout configuration. Reproduce the server hello against ClickHouse read-only mode and trace the setting interaction. Done means the client can connect and complete the hello without attempting an incompatible setting change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clickhouse, go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100