Antalya-26.3 - Backport flaky-fix commits from upstream (2026-07-21)#2101
Open
github-actions[bot] wants to merge 3 commits into
Open
Antalya-26.3 - Backport flaky-fix commits from upstream (2026-07-21)#2101github-actions[bot] wants to merge 3 commits into
github-actions[bot] wants to merge 3 commits into
Conversation
Test 7 reused the same query_id for the TCP 'set opentelemetry_start_trace_probability=1' query and the subsequent HTTP SELECT. Under parallel CI load the two queries can overlap, producing Code 216 QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING. Additionally, check_http_attributes queried the 'query' span for the query_id, but the http.referer / http.user.agent / http.method attributes live on the HTTPHandler (SERVER) span, which carries no clickhouse.query_id. The old substring check matched the JSONEachRow column-name keys, so it always reported the attributes as present regardless of value, i.e. it never actually verified them. Give the HTTP query its own query_id, send a traceparent header (so the request is traced) plus Referer / User-Agent headers, and verify the http.* attribute VALUES on the HTTPHandler span (matched via clickhouse.uri). The reference output is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit 6944c75)
The two K=16 positive-case budgets (5230000 for UInt32, 5900000 for
UInt64) left effectively zero headroom: CI failures showed the tracked
peak landing exactly at the budget ("would use 4.99 MiB, maximum: 4.99
MiB" and "5.63 MiB, maximum: 5.63 MiB") on arm builds. With
memory_profiler_step=1 every allocation is flushed to the query tracker,
so allocator/arena rounding variance intermittently tips these two cases
over.
Give the two flaky K=16 positive budgets ~20% headroom over the observed
peak (6300000 and 7100000). The negative-case budgets (2000000) are left
unchanged, so the assertions still catch any regression that inflates the
HLL state. The K=12 and K=18 budgets already have sufficient margin and
are untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 5e662b6)
The cleanup renames back to num2 run ON CLUSTER (async distributed DDL plus async ReplicatedMergeTree metadata replication) with ignore_exception=True, so a failed or late rename is swallowed. The strict final selects then run with no wait for schema convergence. A distributed SELECT for num2 forwarded to a shard replica whose local _replicated metadata has not yet converged (still foo2/foo3) fails with UNKNOWN_IDENTIFIER at the analyzer. This is correct engine behaviour for per-shard schema during async metadata replication; the test asserted before its precondition held. Replace the fixed cleanup renames with wait_for_rename_to_num2, which re-drives the idempotent ON CLUSTER rename-back and polls system.columns until num2 is present on every node before the strict selects, repairing both a swallowed rename and replication lag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit 51eea39)
Author
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.
Automated backport of upstream flaky-fix commits.
Applied
6944c75587caFix flaky test 02421_simple_queries_for_opentelemetry (committed 2026-07-17T11:54:59Z)5e662b6d2710Fix flaky test 01017_uniqCombined_memory_usage (committed 2026-07-17T17:02:35Z)51eea395dd90Fix flaky test_rename_distributed_parallel_insert_and_select (committed 2026-07-20T17:49:36Z)Skipped (cherry-pick conflict — manual backport needed)
aac9fbc6206eFix flaky test_storage_iceberg_disks: skip S3 disk startup access check (committed 2026-07-15T16:39:35Z)