Skip to content

Update SettingsChangesHistory.cpp - #104097

Merged
antaljanosbenjamin merged 2 commits into
masterfrom
fix-settings-changes-history-after-backporting-auto-spilling-join
May 6, 2026
Merged

antaljanosbenjamin merged 2 commits into
masterfrom
fix-settings-changes-history-after-backporting-auto-spilling-join

Conversation

@antaljanosbenjamin

@antaljanosbenjamin antaljanosbenjamin commented May 5, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

FYI @alexey-milovidov

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.5.1.326

@clickhouse-gh

clickhouse-gh Bot commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a1f746a]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_asan_ubsan, flaky check) FAIL
clickhouse-test FAIL cidb IGNORED
Stateless tests (amd_tsan, flaky check) FAIL
clickhouse-test FAIL cidb IGNORED
Stateless tests (amd_msan, flaky check) FAIL
clickhouse-test FAIL cidb IGNORED
Stateless tests (amd_debug, flaky check) FAIL
clickhouse-test FAIL cidb IGNORED
Performance Comparison (arm_release, master_head, 2/6) FAIL
Insert raw query metrics data FAIL IGNORED
Insert historical data FAIL IGNORED
Finish Workflow FAIL
python3 ./ci/jobs/scripts/workflow_hooks/check_report_messages.py FAIL IGNORED

AI Review

Summary

This PR corrects SettingsChangesHistory by moving max_bytes_before_external_join from 26.5 to 26.4, then updates the 26.4.1 settings expectation test to include it. The change is coherent and scoped; I did not find correctness, safety, or compatibility issues in the diff.

Missing context
  • ⚠️ No CI report/log links were provided in the review input, so runtime validation could not be cross-checked here.
ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ✅
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@antaljanosbenjamin

Copy link
Copy Markdown
Member Author

Original PR: #97813
Backport PR: #103680

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label May 5, 2026
@Algunenano Algunenano self-assigned this May 5, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.00% -0.10%
Functions 91.10% 91.10% +0.00%
Branches 76.60% 76.60% +0.00%

Changed lines: 100.00% (12/12) · Uncovered code

Full report · Diff report

@alexey-milovidov

Copy link
Copy Markdown
Member

Why did clickhouse-test fail?

@antaljanosbenjamin

Copy link
Copy Markdown
Member Author

Why did clickhouse-test fail?

Good question. I briefly tried to figure it out, but failed in 10 minutes. I will have a look at it, but based on CIDB it doesn't look like a unique issue.

@antaljanosbenjamin

Copy link
Copy Markdown
Member Author

Claude helped to find the issue:

What happened

The flaky check ran with clickhouse-test ... -- 02995_settings_26_4_1. (the filter ends with a regex ., so it matches any test whose name starts with 02995_settings_26_4_1). Result:

Found 0 parallel tests and 0 sequential tests
No tests were run.
clickhouse-test exited with code 1

Why it picked that filter

PR #104097 changes only two files:

  • src/Core/SettingsChangesHistory.cpp
  • tests/queries/0_stateless/02995_settings_26_4_1.tsv

The flaky-check driver derives the test name from each changed file under tests/queries/0_stateless/ by stripping the extension. It produced 02995_settings_26_4_1 and asked clickhouse-test to re-run it 50 times. But there is no test named 02995_settings_26_4_1.sql / .sh — the .tsv is a data file consumed by
02995_new_settings_history.sh (a different test number). So the filter matched zero tests, and clickhouse-test returns exit code 1 when "no tests were run."

@antaljanosbenjamin
antaljanosbenjamin added this pull request to the merge queue May 6, 2026
Merged via the queue into master with commit 1062737 May 6, 2026
158 of 165 checks passed
@antaljanosbenjamin
antaljanosbenjamin deleted the fix-settings-changes-history-after-backporting-auto-spilling-join branch May 6, 2026 10:07
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label May 6, 2026
pull Bot pushed a commit to admariner/ClickHouse that referenced this pull request May 6, 2026
The flaky-check driver derives a test name from each changed file under
`tests/queries/0_stateless/` by stripping the file extension. When PR ClickHouse#104097
changed only `02995_settings_26_4_1.tsv` (a data file consumed by
`02995_new_settings_history.sh`), the driver produced the bogus pattern
`02995_settings_26_4_1.` and asked `clickhouse-test` to re-run it 50 times.
No test matches that pattern, so `clickhouse-test` printed
`Found 0 parallel tests and 0 sequential tests` and exited with code 1,
failing the flaky check.

Match files first against the known test extensions
(`.sql`, `.sql.j2`, `.sh`, `.py`, `.expect`); for supporting files such as
`.reference` or `.reference.j2`, walk back one extension at a time looking
for a sibling test source. Orphan data files like `02995_settings_26_4_1.tsv`
are now skipped instead of producing a filter that matches zero tests.

See ClickHouse#104097 (comment)
alexey-milovidov added a commit that referenced this pull request Jul 14, 2026
The merge-queue flaky check (and the regular flaky check it is built on)
selected tests via `Targeting.get_changed_tests`, which only mapped a changed
path back to a test when the path was itself a test source or a supporting
file with a same-named sibling test. A data fixture consumed by a test — either
a root-level orphan like `02995_settings_26_4_1.tsv` or, worse, one nested in a
subdirectory like `data_parquet/02716_data.parquet` (which the old
`\d{5}`-after-prefix regex did not even consider) — resolved to no test. A PR
that changed only such a fixture was therefore treated as "no changed tests",
so `should_skip_merge_queue_job` skipped the drift guard and the merge group
never reran the affected test surface: a false green for the exact drift this
check exists to catch.

Map auxiliary fixtures back to their owning test(s). Fixtures carry the owning
test's five-digit prefix by convention, so the prefix narrows the candidates to
the `NNNNN_*` tests at the suite root (a handful of files, never the whole
suite); among those, prefer the ones whose body actually references the fixture
by name, and fall back to all prefix siblings only when the reference is
constructed dynamically. Only real tests are emitted, so a run never fabricates
a zero-match pattern (which would make `clickhouse-test` exit 1, the failure
mode `PR #104097` fixed). Because both the config-time skip and the in-job
selection call `get_changed_tests`, they stay in sync automatically.

As a side effect this also fixes a latent gap: root-level tests with a
four-digit prefix (`4060_*`, `4061_*`), which the old `\d{5}` regex skipped, are
now selected.

Tests: `ci/tests/test_find_tests.py` covers the subdirectory fixture, the
root-level orphan, unmappable fixtures, and the end-to-end `get_changed_tests`
path.
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The merge-queue flaky check (and the regular flaky check it is built on)
selected tests via `Targeting.get_changed_tests`, which only mapped a changed
path back to a test when the path was itself a test source or a supporting
file with a same-named sibling test. A data fixture consumed by a test — either
a root-level orphan like `02995_settings_26_4_1.tsv` or, worse, one nested in a
subdirectory like `data_parquet/02716_data.parquet` (which the old
`\d{5}`-after-prefix regex did not even consider) — resolved to no test. A PR
that changed only such a fixture was therefore treated as "no changed tests",
so `should_skip_merge_queue_job` skipped the drift guard and the merge group
never reran the affected test surface: a false green for the exact drift this
check exists to catch.

Map auxiliary fixtures back to their owning test(s). Fixtures carry the owning
test's five-digit prefix by convention, so the prefix narrows the candidates to
the `NNNNN_*` tests at the suite root (a handful of files, never the whole
suite); among those, prefer the ones whose body actually references the fixture
by name, and fall back to all prefix siblings only when the reference is
constructed dynamically. Only real tests are emitted, so a run never fabricates
a zero-match pattern (which would make `clickhouse-test` exit 1, the failure
mode `PR ClickHouse#104097` fixed). Because both the config-time skip and the in-job
selection call `get_changed_tests`, they stay in sync automatically.

As a side effect this also fixes a latent gap: root-level tests with a
four-digit prefix (`4060_*`, `4061_*`), which the old `\d{5}` regex skipped, are
now selected.

Tests: `ci/tests/test_find_tests.py` covers the subdirectory fixture, the
root-level orphan, unmappable fixtures, and the end-to-end `get_changed_tests`
path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants