Skip to content

Enable debug logging on fail for deduplication tests - #90094

Merged
yariks5s merged 6 commits into
masterfrom
yarik/deduplication-debug-info-on-fail
Jun 16, 2026
Merged

yariks5s merged 6 commits into
masterfrom
yarik/deduplication-debug-info-on-fail

Conversation

@yariks5s

@yariks5s yariks5s commented Nov 14, 2025 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Details

Enable debug logging on fail for deduplication tests.

Version info

  • Merged into: 26.6.1.895

@clickhouse-gh

clickhouse-gh Bot commented Nov 14, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [5970862]

Summary: ✅


AI Review

Summary

This PR makes 03008_deduplication.python emit extra diagnostic queries only when --debug-on-fail is enabled, and the dedicated deduplication wrapper tests opt into that flag. The previous concern about 03008_deduplication_random_settings.sh no longer holds: that file is not in the net diff, and the debug option now defaults to disabled. I did not find any correctness, safety, or test-contract issues that need inline comments.

Missing context / blind spots
  • ⚠️ The latest PR status was still pending during review. Style check and Config Workflow had succeeded, the Praktika report showed no failed jobs, and Fast test was still in progress; final CI completion would close this gap.
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 14, 2025
@alexey-milovidov

Copy link
Copy Markdown
Member

@yariks5s, it failed in the private CI - please check.

The `03008_deduplication_random_settings` test discards all client
output (`1>/dev/null 2>&1`), so the debug-on-fail statements produce no
useful diagnostics there while roughly tripling the number of executed
queries per case. Unlike the dedicated `03008_deduplication_*` tests
(tagged `no-flaky-check`), this test has no such tag and is therefore
run repeatedly by the flaky check, where the extra queries pushed it
over the time limit ("Test runs too long") in the private CI.

Disable `--debug-on-fail` here since its output is discarded anyway.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Dear @CheSema, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

@clickhouse-gh clickhouse-gh Bot assigned CheSema and unassigned CheSema Jun 1, 2026
The private CI flaky check failed on `03008_deduplication_random_settings`
with `Test runs too long (> 180s)`. That test is inherently heavy under
ASan/UBSan with `s3 storage` and meta in Keeper (it runs right at the
180s boundary: 157-213s across runs). It is not made slower by this PR,
because its `clickhouse-client` output is suppressed with `1>/dev/null 2>&1`
and so it does not generate any debug statements. It was only pulled into
the flaky check because the PR modified its file.

Default `--debug-on-fail` to `False` so debug logging is opt-in: the
focused tests that want it still pass `--debug-on-fail True` explicitly,
while `03008_deduplication_random_settings.sh` no longer needs the flag.
Reverting that file to its original form keeps the borderline-slow test
out of the flaky check's changed-test set.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

Checked the private CI failure (CH Inc sync). The failing job is the flaky check Stateless tests (amd_asan_ubsan, flaky check, s3 storage, meta in keeper), and the only failing test is 03008_deduplication_random_settings with Test runs too long (> 180s) (runs observed: 157s/163s/176s OK, then 184s/191s/213s/180s/188s FAIL; the run-out eventually triggers the Server died known flaky #58397).

This test is inherently heavy under ASan/UBSan with s3 storage + meta in Keeper — it sits right at the 180s per-test budget. On master it averages ~17s but reaches a max of 255s, so it is borderline by nature. It is not made slower by this PR: its clickhouse-client output is discarded with 1>/dev/null 2>&1, so it generates no debug statements at all. It was only dragged into the flaky check because the PR touched its file (the flaky check runs changed tests ~100×).

Fix in 46c514a: default --debug-on-fail to False (debug logging is now opt-in) and revert 03008_deduplication_random_settings.sh back to its original form. The focused tests that want diagnostics still pass --debug-on-fail True explicitly; random_settings no longer needs the flag, so it is no longer a changed test and won't be exercised by the flaky check. No reference files change since debug SELECTs are guarded by WHERE count() != expected and emit nothing on success.

@alexey-milovidov

Copy link
Copy Markdown
Member

Merged master to refresh the base (the branch was ~2245 commits behind and the only red was CH Inc sync reporting "tests failed", most likely a stale-base artifact for this test-only change). No code changes — the diff remains test-only (03008_deduplication.python opt-in --debug-on-fail plus the six wrapper .sh tests). CI will re-run on the fresh base.

@alexey-milovidov

Copy link
Copy Markdown
Member

Correction to my previous comment: on the actual head 46c514a5660, CH Inc sync and Mergeable Check were both green — the only red was Report messages | 19 warning(s) (0 errors). Those are workflow-level infrastructure warnings (Failed to start Kafka / Failed to start log export / Failed to create minio log tables / Failed to collect all logs) emitted by some test jobs, which accumulated over the ~8-day-old base. They cannot be produced by this test-only change (03008_deduplication.python + the six wrapper .sh tests; no C++, no .reference changes). Merged master (597086227f9) to refresh the stale base; CI will re-evaluate Report messages on the fresh run.

@clickhouse-gh

clickhouse-gh Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.60% 84.60% +0.00%
Functions 92.30% 92.30% +0.00%
Branches 77.30% 77.20% -0.10%

Changed lines: No C/C++ source files changed — skipping uncovered code analysis.

Newly covered by added/modified tests: 320 line(s), 9 function(s) across 111 file(s) · Details

Top files
  • src/Backups/BackupEntriesCollector.cpp: 29 line(s), 2 function(s)
  • src/Storages/StorageReplicatedMergeTree.cpp: 29 line(s)
  • src/AggregateFunctions/AggregateFunctionQuantileInterpolatedWeighted.cpp: 8 line(s)
  • src/IO/AzureBlobStorage/copyAzureBlobStorageFile.cpp: 7 line(s)
  • src/Functions/FunctionsBitmap.h: 6 line(s)

Full report

@yariks5s
yariks5s added this pull request to the merge queue Jun 16, 2026
Merged via the queue into master with commit 4bc1e7e Jun 16, 2026
166 checks passed
@yariks5s
yariks5s deleted the yarik/deduplication-debug-info-on-fail branch June 16, 2026 21:58
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 16, 2026
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