Skip to content

Disable use_hedged_requests when parallel replicas are enabled in test randomisers - #98519

Closed
rienath wants to merge 1 commit into
masterfrom
fix-pr-ci
Closed

rienath wants to merge 1 commit into
masterfrom
fix-pr-ci

Conversation

@rienath

@rienath rienath commented Mar 2, 2026 •

Copy link
Copy Markdown
Member

When use_hedged_requests=1 is combined with parallel replicas, this triggers a LOG_WARNING in updateContextForParallelReplicas and causes red CI. This PR prevents such combination.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

@clickhouse-gh

clickhouse-gh Bot commented Mar 2, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [9c48005]

Summary: ✅

@nickitat nickitat self-assigned this Mar 2, 2026
client_options.append("cluster_for_parallel_replicas='parallel_replicas'")
client_options.append("parallel_replicas_for_non_replicated_merge_tree=1")
# Hedged requests are not compatible with parallel replicas and produce a warning on stderr
client_options.append("use_hedged_requests=0")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is strange. The stress test should test all combinations of settings.
If the problem is only with the health check at the start of the stress test, we should fix this health check.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We only disable it in the case of enable_parallel_replicas=1 as use_hedged_requests is not compatible with PR

Comment thread tests/clickhouse-test
random_settings["parallel_replicas_local_plan"] = 1
random_settings["parallel_replicas_for_non_replicated_merge_tree"] = 1
# Hedged requests are not compatible with parallel replicas and produce a warning on stderr
random_settings["use_hedged_requests"] = 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should not inhibit randomization globally. Let's fix the only affected test.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We do this in adjust_settings_for_autopr function, so it does not inhibit randomisation globally. It only turns off hedged requests with autoPR in stress tests as they are incompatible.

Maybe I do not understand what you mean. In that case, could you please elaborate?

@rienath rienath left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

client_options.append("cluster_for_parallel_replicas='parallel_replicas'")
client_options.append("parallel_replicas_for_non_replicated_merge_tree=1")
# Hedged requests are not compatible with parallel replicas and produce a warning on stderr
client_options.append("use_hedged_requests=0")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We only disable it in the case of enable_parallel_replicas=1 as use_hedged_requests is not compatible with PR

Comment thread tests/clickhouse-test
random_settings["parallel_replicas_local_plan"] = 1
random_settings["parallel_replicas_for_non_replicated_merge_tree"] = 1
# Hedged requests are not compatible with parallel replicas and produce a warning on stderr
random_settings["use_hedged_requests"] = 0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We do this in adjust_settings_for_autopr function, so it does not inhibit randomisation globally. It only turns off hedged requests with autoPR in stress tests as they are incompatible.

Maybe I do not understand what you mean. In that case, could you please elaborate?

@alexey-milovidov

Copy link
Copy Markdown
Member

While these settings are not compatible, the Stress test should still try random combinations of them to check memory safety and assertions.

alexey-milovidov added a commit that referenced this pull request Mar 4, 2026
…el replicas

When `use_hedged_requests` is combined with `enable_parallel_replicas`,
the server gracefully disables hedged requests. There is no need for a
`LOG_WARNING` here — it causes stress test failures because the warning
is forwarded to the client's stderr and any stderr output makes the test
fail. An `INFO` message is sufficient since the situation is handled
automatically.

This is a better fix than #98519
because it still allows the stress test to exercise the combination of
both settings for memory safety and assertion checking.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=28cd79a24459619126bbecbd3d836afd370b333d&name_0=MasterCI&name_1=Stress%20test%20%28azure%2C%20amd_tsan%29

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

Maybe this will be ok: #98689

@rienath

rienath commented Mar 5, 2026

Copy link
Copy Markdown
Member Author

Solved it #98689

@rienath rienath closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants