Skip to content

Raise the minimum randomized compatibility in stress and fuzzer runs to 26.3 - #124027

Closed
groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:ci-compatibility-floor-26-3
Closed

groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:ci-compatibility-floor-26-3

Conversation

@groeneai

@groeneai groeneai commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

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

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Not required.

Description

As requested in #123752 (comment): 26.3 is the oldest supported release (SECURITY.md), so CI no longer runs the server with an older compatibility.

Four producers drew one below 26.3. Each now starts at 26.3 and keeps its upper bound:

  • stress runner (stress.py, 20% of runs): {20..26}.{1..12} -> 26.3..26.12;
  • AST fuzzer: the random arm 24.1..27.12 -> 26.3..27.12, the old_compatibility job 24.3 -> 26.3;
  • BuzzHouse: 24.3..<current month> -> 26.3..<current month>.

A value newer than the running version is a valid no-op (default settings) until that release ships. The floor needs a bump when 26.3 leaves support.

This removes a stress hung check where a cancelled BACKUP ... ON CLUSTER stays in the processlist for 20-65 minutes: compatibility <= 24.10 resets four BACKUP ON CLUSTER settings to 0 (no Keeper retries, no deadline on the wait after an error), and the stress Keeper fault injection then leaves the initiator waiting without a deadline. Seen 4 times in 10 days, e.g. on master: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=ddae0611a3ab661ca71bd60ed21d202c4a544542&name_0=MasterCI&name_1=Stress%20test%20%28arm_debug%29 and on #115453: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=115453&sha=e8be30e79ebc4b0451cfa8922a81560da6d672aa&name_0=PR&name_1=Stress%20test%20%28amd_debug%29

The max_parser_backtracks=1000000 client pin stays. Since #111120 the client no longer sends compatibility-derived values, but a test's own SET compatibility older than 24.3 still resets it to 0 (unbounded) for the client's own parser; its two comments now say so.

Validation (throwaway probes): 20000 get_options draws give exactly 26.3..26.12 (master: from 20.1); the AST fuzzer expressions give exactly the 22 months 26.3..27.12, plus 26.3; BuzzHouse SessionSettings.cpp compiles. After SET compatibility = '20.3' the client parses the 03012_parser_backtracking query unbounded (11 s, then a syntax error); with the pin it stops at TOO_SLOW_PARSING in 1 s.


Workflow [PR]
Sync PR [sync-upstream/pr/124027]

…s to 26.3

Requested in ClickHouse#123752 (comment):
26.3 is the oldest supported release. The stress runner drew `compatibility` from 20.1,
the AST fuzzer from 24.1 (and pinned 24.3 in its `old_compatibility` job), and BuzzHouse
from 24.3. Under `compatibility` <= 24.10 with Keeper fault injection, a cancelled
`BACKUP ... ON CLUSTER` waited without a deadline and failed the stress hung check.

The `max_parser_backtracks` client pin stays. Since ClickHouse#111120 the client no longer sends
compatibility-derived values, but a test's own `SET compatibility` older than 24.3 still
reverts it to 0 (unbounded) for the client's own parser; its comments now say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding labels Oct 5, 2026
@groeneai

groeneai commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (2 findings).

# Sev Finding Verdict Evidence / action
1 💡 The 26.3 floor is a literal in three files and needs a manual bump when 26.3 leaves support AGREE Stated in the description; a shared helper would span a container script, the CI host and C++
2 💡 The description said the cancelled backup waits "forever"; the code has an untimed wait AGREE Description reworded to "without a deadline"; no code change

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are
terminal per finding.

Session id: cron:clickhouse-review-slot-11:20261005-125000

@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Oct 5, 2026
@groeneai

groeneai commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. Throwaway probes over the real source: 20000 get_options draws on master yield compatibility from 20.1; the AST fuzzer expressions yield 24.1..27.12 and 24.3. Both are deterministic for the value range.
b Root cause explained? The CI harness drew compatibility from floors older than every supported release (stress 20.1, AST fuzzer 24.1/24.3, BuzzHouse 24.3). Under compatibility <= 24.10, four BACKUP ON CLUSTER settings revert to 0, and with stress Keeper fault injection a cancelled BACKUP ... ON CLUSTER waits without a deadline and fails the hung check.
c Fix matches root cause? Yes. Each producer's floor moves to 26.3 (the oldest supported release, as requested in #123752), with its upper bound unchanged; no server code or test guard.
d Test intent preserved / new tests added? No committed test: CI-script change, checked with throwaway probes. No existing test changed; the max_parser_backtracks client pin stays.
e Both directions demonstrated? Yes. Master: stress draws from 20.1, AST fuzzer from 24.1. This branch: exactly 26.3..26.12 (stress), exactly the 22 months 26.3..27.12 plus 26.3 (AST fuzzer). For the pin comment: after SET compatibility = '20.3', the client parses the 03012_parser_backtracking query unbounded (11 s, syntax error); with the pin it stops at TOO_SLOW_PARSING (1 s).
f Fix is general across code paths? All four producers are changed: stress, AST fuzzer random arm, AST fuzzer old_compatibility job, BuzzHouse. run-fuzzer.sh only consumes the AST fuzzer value; the upgrade check pins the previous release (26.9); tests/clickhouse-test and tests/config set no compatibility.
g Fix generalizes across inputs (params/datatypes/wrappers)? The full value ranges were enumerated. A value newer than the running version is a valid no-op (applyCompatibilitySetting stops at the first older history record) until that release ships.
h Backward compatible? (maintainer-approved exception only) Yes. CI harness only; no server code or setting changes.
i Invariants and contracts preserved? No CI producer hands the server a compatibility below 26.3; the upgrade check still never draws one; the client pin line is unchanged. BuzzHouse SessionSettings.cpp compiles.

Session id: cron:clickhouse-impl-slot-5:20261005-123500

@clickhouse-gh

clickhouse-gh Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b63c96f]


AI Review

Summary

This PR raises the randomized compatibility floor used by the stress runner, the AST fuzzer, and BuzzHouse to 26.3, while preserving each path's intended upper bound and keeping the max_parser_backtracks guard comments aligned with the current client-side parsing behavior. I did not find a correctness, safety, or meaningful coverage regression in the changed paths, and the linked Praktika workflow for this PR is all-green.

Final Verdict
  • Status: ✅ Approve

Comment thread ci/jobs/ast_fuzzer_job.py
compatibility_setting = (
f"{random.randint(24, 27)}.{random.randint(1, 12)}"
)
# A uniform month in 26.3..27.12.

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.

@groeneai can you make this more future proof? The maximum value should be for the current month, in today's case 26.10

@PedroTadim PedroTadim self-assigned this Oct 5, 2026
@PedroTadim PedroTadim closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding manual approve Manual approve required to run CI pr-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants