Skip to content

fix: respect clickhouse max_query_size#4593

Open
dtunikov wants to merge 3 commits into
mainfrom
fix/respect-ch-max-query-size-for-batches
Open

fix: respect clickhouse max_query_size#4593
dtunikov wants to merge 3 commits into
mainfrom
fix/respect-ch-max-query-size-for-batches

Conversation

@dtunikov

Copy link
Copy Markdown
Collaborator

No description provided.

@dtunikov
dtunikov requested a review from a team as a code owner July 16, 2026 13:25
@dtunikov dtunikov changed the title respect clickhouse query batch size fix: respect clickhouse max_query_size Jul 16, 2026
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Comment thread flow/connectors/clickhouse/object_sync.go Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: The flow/e2e package hit its exact 1200s timeout (a whole-suite hang, no assertion/panic trace) in only 1 of 3 matrix cells — the identical ClickHouse code from the PR passed in the other two cells — which is a classic flaky-timeout signature rather than a deterministic bug.
Confidence: 0.72

✅ Automatically retrying the workflow

View workflow run


// fetchURLBatchLimits reads the effective max_query_size and
// table_function_remote_max_addresses from ClickHouse directly.
func (c *ClickHouseConnector) fetchURLBatchLimits(ctx context.Context) urlBatchLimits {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add an integration test for this one? Possible to override settings within a connection and not affect other tests

rows, err := c.query(ctx,
"SELECT name, value FROM system.settings WHERE name IN ('max_query_size', 'table_function_remote_max_addresses')")
if err != nil {
c.logger.Warn("failed to read ClickHouse batch-limit settings, using defaults", slog.Any("error", err))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would prefer to stay deterministic in face of network hiccups. I guess if the defaults are not good enough, the worst that's going to happen is either failing and successfully retrying, or too small batching, but the error we'd receive would be the same as today and we'd get paged. Let's just return the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants