Skip to content

Client sets max_execution_time, which is incompatible with read-only mode #1748

@bobrik

Description

@bobrik

Here's where the setting is set:

clickhouse-go/context.go

Lines 238 to 240 in c5bccc8

if sec := time.Until(deadline).Seconds(); sec > 1 {
opt.settings["max_execution_time"] = int(sec + 5)
}

Here's where the time out is confiugred:

clickhouse-go/clickhouse.go

Lines 304 to 305 in c5bccc8

ctx, cancel := context.WithTimeoutCause(ctx, ch.opt.DialTimeout, ErrAcquireConnTimeout)
defer cancel()

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions