Repository navigation
Conversation
Contributor
|
Workflow [PR], commit [db31f8c] Summary: ❌
AI ReviewSummaryThis PR adds null-part guards to the deduplication-conflict retry path in Missing context / blind spots
Final Verdict✅ No blocking issues found in the current version of this PR. |
Diskein
force-pushed
the
dk-rmt-fix-sigfault-on-async-insert-optimize-insert-dedupliacation-token
branch
from
July 3, 2026 07:50
e216661 to
b7a1b69
Compare
tiandiwonder
reviewed
Jul 3, 2026
Diskein
marked this pull request as draft
July 3, 2026 08:55
Diskein
force-pushed
the
dk-rmt-fix-sigfault-on-async-insert-optimize-insert-dedupliacation-token
branch
2 times, most recently
from
July 3, 2026 09:04
b60579a to
d13d487
Compare
Diskein
force-pushed
the
dk-rmt-fix-sigfault-on-async-insert-optimize-insert-dedupliacation-token
branch
from
July 3, 2026 09:28
d13d487 to
794f752
Compare
Contributor
Author
|
03716_mutations_parts_postpone_reasons_rmt - #107488 |
Diskein
marked this pull request as ready for review
July 3, 2026 17:11
1 task
pull Bot
pushed a commit
to admariner/ClickHouse
that referenced
this pull request
Jul 3, 2026
The per-arch `Bugfix validation` jobs (functional and integration) were
cacheable via a `digest_config`, but their verdict cannot be soundly cached.
The runner runs the new regression test on the PR and on a master-HEAD binary
that it downloads at run time from a recent master commit (see
`bugfix_validation.find_master_builds`), then inverts the status. The verdict
therefore depends on (1) the PR's source fix and (2) master HEAD, neither of
which is a repository file, so no digest can capture the job's true inputs.
When the bug does not reproduce on master HEAD on an arch, the per-arch job
legitimately reports a top-level `SKIPPED`. The CI cache decides what to
persist as a reusable success with `Result.is_ok`, which treats `SKIPPED` as
success, so that `SKIPPED` is pushed as a cache-success record. On a later
commit whose test content hashes to the same digest, the config job reuses it
("reused from cache") instead of re-running - even after the fix or master
HEAD changed. Because the merge-blocking `new_tests_check.py` post-hook uses
strict `is_success` (a reused `SKIPPED` does not count), it then fails with
"No per-arch Bugfix Validation job validated the bug", and the job never
re-runs to produce a real verdict.
Fix: drop `digest_config` from all four per-arch jobs. `calc_job_digest` then
returns the null digest, which `hook_cache.py` excludes from both cache lookup
and cache push, so the jobs re-run on every eligible commit. They stay gated
to bug-fix PRs with test changes by `filter_job.py` and run only the changed
tests, so this is cheap.
Add `ci/tests/test_bugfix_validation_not_cached.py` to pin the jobs as
non-cacheable so the digest is not reintroduced.
Observed on ClickHouse#109229
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ze-insert-dedupliacation-token
Contributor
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 12/12 (100.00%) · Uncovered code |
Contributor
Author
|
The tests failures aren't related. I've fixed all reviews remarks, but have to merge the PR, since it affects users |
Diskein
deleted the
dk-rmt-fix-sigfault-on-async-insert-optimize-insert-dedupliacation-token
branch
July 6, 2026 17:17
This was referenced Jul 6, 2026
clickhouse-gh Bot
added a commit
that referenced
this pull request
Jul 6, 2026
Backport #109229 to 26.6: Fix server crash on deduplicated async insert with optimize_on_insert
tiandiwonder
added a commit
that referenced
this pull request
Jul 7, 2026
Backport #109229 to 26.3: Fix server crash on deduplicated async insert with optimize_on_insert
tiandiwonder
added a commit
that referenced
this pull request
Jul 7, 2026
Backport #109229 to 26.4: Fix server crash on deduplicated async insert with optimize_on_insert
tiandiwonder
added a commit
that referenced
this pull request
Jul 7, 2026
Backport #109229 to 26.5: Fix server crash on deduplicated async insert with optimize_on_insert
kewin-robetti
pushed a commit
to viasoftkorp/ClickHouse
that referenced
this pull request
Aug 24, 2026
…async insert with optimize_on_insert
kewin-robetti
pushed a commit
to viasoftkorp/ClickHouse
that referenced
this pull request
Aug 24, 2026
…async insert with optimize_on_insert
kewin-robetti
pushed a commit
to viasoftkorp/ClickHouse
that referenced
this pull request
Aug 24, 2026
…async insert with optimize_on_insert
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
The per-arch `Bugfix validation` jobs (functional and integration) were
cacheable via a `digest_config`, but their verdict cannot be soundly cached.
The runner runs the new regression test on the PR and on a master-HEAD binary
that it downloads at run time from a recent master commit (see
`bugfix_validation.find_master_builds`), then inverts the status. The verdict
therefore depends on (1) the PR's source fix and (2) master HEAD, neither of
which is a repository file, so no digest can capture the job's true inputs.
When the bug does not reproduce on master HEAD on an arch, the per-arch job
legitimately reports a top-level `SKIPPED`. The CI cache decides what to
persist as a reusable success with `Result.is_ok`, which treats `SKIPPED` as
success, so that `SKIPPED` is pushed as a cache-success record. On a later
commit whose test content hashes to the same digest, the config job reuses it
("reused from cache") instead of re-running - even after the fix or master
HEAD changed. Because the merge-blocking `new_tests_check.py` post-hook uses
strict `is_success` (a reused `SKIPPED` does not count), it then fails with
"No per-arch Bugfix Validation job validated the bug", and the job never
re-runs to produce a real verdict.
Fix: drop `digest_config` from all four per-arch jobs. `calc_job_digest` then
returns the null digest, which `hook_cache.py` excludes from both cache lookup
and cache push, so the jobs re-run on every eligible commit. They stay gated
to bug-fix PRs with test changes by `filter_job.py` and run only the changed
tests, so this is cheap.
Add `ci/tests/test_bugfix_validation_not_cached.py` to pin the jobs as
non-cacheable so the digest is not reintroduced.
Observed on ClickHouse#109229
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
…ult-on-async-insert-optimize-insert-dedupliacation-token Fix server crash on deduplicated async insert with optimize_on_insert
pull Bot
pushed a commit
to stnxo2023/ClickHouse
that referenced
this pull request
Sep 13, 2026
The CI cache pushes a success record whenever Result.is_ok() holds, which covers OK, SKIPPED and XFAIL. That is right for a verdict determined by the checked-out tree, and wrong for a job whose outcome also depends on run-time state no digest input captures: the record is then reused on a later commit that hashes the same, and the run that would have produced a real verdict never happens. See ClickHouse#109229, where the functional and integration bugfix validators hit exactly this and were made non-cacheable by dropping their digest entirely. do_not_cache is the narrower lever for a job whose digest is load-bearing for scheduling, and it mirrors the existing per-run do_not_block_pipeline_on_failure flag: same Result.ext dict, same complete_job keyword, one runner consumer. It is opt-in and appended last in the signature, so a job that does not pass it keeps today's behaviour exactly, and nothing about digests, affectedness, changed-file filtering or cache lookup changes.
bytehalo-infra
added a commit
to sentioxyz/ClickHouse
that referenced
this pull request
Sep 25, 2026
STOR: async insert with dedup when optimize_on_insert empties the block -> crash. Effect in the production build a394e92: its upstream test(s) 04493_async_insert_dedup_optimize_on_insert_replicated_merge_tree fail on it (the server process died in 04493_async_insert_dedup_optimize_on_insert_replicated_merge_tree) and pass on official 26.8.8.8, run on isolated servers (evidence/fix_ci_20260925/upstream_repro/server_triage_PROD263_vs_UP2688.tsv). Upstream patch unchanged, with its test(s): 04493_async_insert_dedup_optimize_on_insert_replicated_merge_tree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An async insert that hits a deduplication conflict re-writes its temporary part. With
optimize_on_insertthe re-written block can become empty (e.g. rows summing to zero inSummingMergeTree). In that case no part is created,temp_part->partis null, and the server crashed on dereferencing it. Fixed bothReplicatedMergeTreeSinkandMergeTreeSink.Added SQL tests for both engines.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed a server crash on asynchronous insert with deduplication when
optimize_on_insertmakes the inserted block empty (for example, rows summing to zero inSummingMergeTree).Version info
26.7.1.559(included in26.7and later)26.6.2.37,26.5.6.19,26.4.5.107,26.3.17.27