Skip to content

Revert "Fix SettingsConstraints erasing explicit settings before compatibility applies" - #98515

Merged
alexey-milovidov merged 1 commit into
masterfrom
revert-97078-fix-settings
Mar 2, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
revert-97078-fix-settings

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Mar 2, 2026 •

Copy link
Copy Markdown
Member

Reverts #97078

Version info

  • Merged into: 26.3.1.275

@alexey-milovidov
alexey-milovidov requested a review from rienath March 2, 2026 16:15
@clickhouse-gh

clickhouse-gh Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [68834a4]

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Mar 2, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member Author

Root Cause Analysis: "Test script failed" in Stress Tests

PR #97078 ("Fix SettingsConstraints erasing explicit settings before compatibility applies"), merged as 28cd79a2445 on March 2, 12:40 UTC, is the trigger.

Statistical proof

Commit range Failure rate
23 commits before 28cd79a2445 on March 2 0% (0 out of ~200 stress runs)
cb7037cb8b1 (immediate parent) 0% (0/9)
28cd79a2445 (fix-settings merge) 10% (1/10)
Subsequent commits 10–31%

The single March 1 failure (1/9 runs at 5a0a680930b0) was random chance with the baseline ~1–2% probability from settings randomization.

Mechanism

The stress test smoke check runs test 00234_disjunctive_equality_chains_optimization with randomized settings, which can include:

  • compatibility='25.1' from get_options (20% of processes)
  • use_hedged_requests=1 from SettingsRandomizer (50% probability)
  • Parallel replicas via enable_parallel_replicas=1 (20%) or automatic_parallel_replicas_mode=2 (25%)

use_hedged_requests defaults to true (src/Core/Settings.cpp:355).

Before #97078: SettingsConstraints::check called getNewValueToCheck, which checked if the new value equals the current value. Since use_hedged_requests=1 matches the default true, the setting was erased from the changes list. The changed flag remained false, and the hedged requests warning in updateContextForParallelReplicas (src/Interpreters/ClusterProxy/executeQuery.cpp:494–518) never fired.

After #97078: When compatibility is present in the same batch of settings, SettingsConstraints::check now keeps all settings even if they match current values (to prevent compatibility from overriding explicit user values). So use_hedged_requests=1 is kept, applied, and marked as changed=true. The hedged requests warning fires, stderr becomes non-empty, and the smoke check test fails.

The warning that fires

Hedged requests are not compatible with parallel replicas. Settings 'use_hedged_requests' will be disabled.

This Warning-level log message is forwarded to client stderr because send_logs_level defaults to "warning" in clickhouse-test. The test then fails because the reference file doesn't expect anything on stderr.

@alexey-milovidov alexey-milovidov self-assigned this Mar 2, 2026
@alexey-milovidov
alexey-milovidov merged commit 576fdb2 into master Mar 2, 2026
35 of 41 checks passed
@alexey-milovidov
alexey-milovidov deleted the revert-97078-fix-settings branch March 2, 2026 17:09
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 2, 2026
@rienath rienath added the post-approved Approved, but after the PR is merged. label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

post-approved Approved, but after the PR is merged. pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants