Skip to content

Roll back collected set elements when collecting them fails - #121898

Closed
groeneai wants to merge 6 commits into
ClickHouse:masterfrom
groeneai:fix/set-append-elements-rollback
Closed

groeneai wants to merge 6 commits into
ClickHouse:masterfrom
groeneai:fix/set-append-elements-rollback

Conversation

@groeneai

@groeneai groeneai commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #119545
Related: #120940

Changelog category (leave one):

  • Improvement

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

Collecting the values of a JOIN runtime filter (enable_join_runtime_filters) is now all-or-nothing: if an allocation fails part way through, the values collected so far are restored. A JOIN that exceeds a memory limit now reports that limit, instead of an internal LOGICAL_ERROR about inconsistent column offsets.

Description

enable_join_runtime_filters is on by default, so ExactSetRuntimeFilter sits on the ordinary JOIN path. It collects its values through Set::appendSetElements, which appended into a retained member with no rollback. ColumnArray::insertRangeFrom grows the nested column before appending its own offsets, so an allocation failure in the middle left the Set holding a column whose nested data and offsets permanently disagree. Nothing restored it, and the next reader (getValuesColumn -> convertToFullIfWrapped) raised LOGICAL_ERROR: offsets_column has data inconsistent with nested_column. CI hit it twice on code-disjoint carriers: 2026-09-18 and 2026-09-23.

appendSetElements now checkpoints every element column before any mutation and rolls back on failure, in the shape of StorageBuffer::appendBlock (prior art: #43338). One function, one include, no setting, no ABI change; the success path only gains a checkpoint per element column. The regression test is a gtest and not a stateless test because the failure needs a race between two build-side transforms that SQL cannot force (no occurrence in 2500 fault-injection iterations).

Improvement and not Bug Fix: on a stock release the symptom is a confusing internal error in place of MEMORY_LIMIT_EXCEEDED, because the abort needs a debug or sanitizer build, or the expert-only abort_on_logical_error.

One question. The collected values are now consistent, but the filter may still be partial: master already publishes a partial filter from paths this PR does not touch (the target-type cast before the insert; an upstream exception reaching the transform's no-op hook), and a failed build's min/max range is only a prefix. I left that fence out, since it is what #120940 attempted. Do you want it here? About four files: mark an incomplete build at the BuildRuntimeFilterTransform boundary, inherit the mark on merge, and have finishInsert drop the key set.

Validation, and two deliberate simplifications of the precedent

New deterministic gtest, src/Interpreters/tests/gtest_set_elements_rollback_exception_safety.cpp, one TEST, 139 lines, mirroring the tree's own gtest_set_variants_init_exception_safety.cpp (79 lines, one TEST, same directory, same defect class). It drives the public Set::insertFromColumns with an Array(Variant(String, UInt64)) element type, collects two batches with no limit in force, then arms a hard limit on its own thread, sized so appending a tiny third batch has to grow the collected values and fails.

unit_tests_dbms --gtest_filter='SetElements*'   # 190 ms, no probability anywhere
  • Without the fix: exit 134, Logical error: 'offsets_column has data inconsistent with nested_column. Data size: 136, last offset: 128', with the same frames as the CI stack (ColumnArray ctor <- convertToFullIfWrapped).
  • With the fix: passes. --gtest_repeat=20 -> 20/20.
  • Negative control: with the fix present but the rollback loop body removed, the failure returns identically. So the test passes because of the rollback, not because of the try/catch.
  • The logged throwing frames confirm the site is the intended one: Allocator::realloc <- ColumnString::doInsertRangeFrom <- ColumnVariant::insertRangeFromImpl <- ColumnArray::doInsertRangeFrom <- Set::appendSetElements.
  • RuntimeFilterLookup, SetVariants and MergeTreeSetIndex suites stay green; clang-tidy is clean.

Two deliberate simplifications of StorageBuffer::appendBlock, so this is not read as an incomplete copy: there is no mutated_columns counter, because rolling back to the current size is a no-op and set_elements never has columns moved out of it; and there is no "no column to rollback" check, because the empty-column branch evaluates IColumn::mutate into a local before touching set_elements[i], so that element is never observably null on any path.


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

groeneai and others added 3 commits September 24, 2026 02:31
Set::appendSetElements appends into set_elements, a retained member, with a bare
non-atomic insertRangeFrom. A JOIN runtime filter keeps its Set and reads the
collected elements back when the build-side filters are merged, so a throw in
the middle of that append is not confined to the failing query step: it leaves a
column behind whose nested data and offsets disagree.

For an Array(Variant(...)) element type the window is concrete.
ColumnArray::insertRangeFrom reserves its offsets, grows the nested column, and
appends its own offsets last, while ColumnVariant::size() is offsets->size() and
ColumnVariant::insertRangeFromImpl grows local_discriminators and offsets in its
first loop before filling the variants in its second. A MEMORY_LIMIT_EXCEEDED in
that second loop therefore leaves the nested column reporting its post-append
length while the outer ColumnArray's offsets still hold the pre-append total.

Reading that column back raises
"offsets_column has data inconsistent with nested_column" from the validating
ColumnArray constructor, reached through
ExactSetRuntimeFilter::mergeFrom -> insert -> Set::insertFromColumns ->
convertToFullIfWrapped, which in a debug or sanitizer build aborts the server.

Take a checkpoint of every element column before any modification and roll them
all back on the way out, in the shape of StorageBuffer::appendBlock. Two
deliberate simplifications against that precedent: rollback on an untouched
column is a no-op, so no mutated-column counter is needed, and set_elements owns
its columns uniquely, so nothing is ever moved out and back and no "no column to
rollback" check is needed. The empty-element branch replaces the column instead
of appending to it, so the replaced column is kept and restored by move rather
than by checkpoint.

Rolling back all keys also removes the cross-key length skew a throw at key i
used to leave behind for a multi-column set.
The failure needs a race that SQL cannot force. A mid-append throw makes the
throwing BuildRuntimeFilterTransform bail out of work() early, so it wins the
finish race and RuntimeFilterLookup::add registers ITS filter, i.e. the
corrupted filter becomes the merge destination, and RuntimeFilter::merge only
ever reads the source's values column, so a corrupted destination is never
validated. 2500 iterations of the best fault-injection configuration found
(1352 faulted queries, 594 faults inside appendSetElements, 48 of them below
insertRangeFrom) produced no occurrence, so a stateless test here would be an
oracle that cannot fail.

This gtest drives the public Set::insertFromColumns with an
Array(Variant(String, UInt64)) element type, in the shape of the neighbouring
gtest_set_variants_init_exception_safety.cpp. Three properties are load-bearing:

  - Both variant kinds are present in every array. With one non-empty variant
    and no NULLs, ColumnVariant::insertRangeFromImpl takes the fast path, which
    inserts into the variant before growing its offsets and therefore leaves no
    window.
  - The payload is large in bytes and small in rows, so one memory hard limit
    sized in bytes selects the append over the filter() copy that precedes it
    in the same loop iteration. Measured separation: a 32 MiB copy against a
    128 MiB grow, with the limit set 64 MiB above the amount at arming.
  - Two batches are collected with the limit lifted, so the third one has to
    grow a buffer that is already full.

Without the rollback the test fails through the same frames as the recorded
stack, with
  offsets_column has data inconsistent with nested_column. Data size: 192, last offset: 128

Two assertions beyond the structural one. The propagated exception's code,
because the rollback's contract is to rethrow the original rather than raise one
of its own. And the set's row count, because the hash table is filled before the
values are collected, so a full count shows the refusal landed in the collecting
step rather than in a step before it. The row count bounds the window from one
side only: it places the refusal after the hash table was filled, i.e. inside
appendSetElements, and does not by itself exclude the filter() copy in the same
loop iteration, which stays bounded by the measured separation above.

No build-system change is needed or wanted: src/CMakeLists.txt collects unit
tests with a recursive gtest*.cpp glob.

Co-Authored-By: Claude Opus 5 <[email protected]>
Set.cpp: drop the narration of the new rollback's own design and of the log/lock ordering; keep the pre-existing invariants (set_elements outlive a failed append, a checkpoint binds to its column, a failed rollback must not leave incorrect state) at the density of the StorageBuffer::appendBlock precedent.
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding labels Sep 24, 2026
@groeneai

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

Pre-publication review by an independent model (engine: codex). Two full passes plus one fix
round: 2 gate findings and 3 of my own on the first head, then a delta re-review of the fix on
e22186ebf9fbd, which returned 0 gate findings and one nit of mine.

# Sev Finding Verdict Evidence / action
1 ⚠️ The regression test asserts only that something threw, so it does not pin the promised MEMORY_LIMIT_EXCEEDED (gtest_set_elements_rollback_exception_safety.cpp:83-95) AGREE, fixed @ e22186ebf9fbd The changelog entry promises the memory limit is what surfaces, and the bare throw; at Set.cpp:335 is what keeps it. The test now captures e.code() and asserts it; only the integer is taken while the hard limit is armed
2 💡 The armed memory limit spans the hash-table fill and the filter() copy as well as the append, so a refusal landing before the mutation would pass without exercising the rollback AGREE, fixed @ e22186ebf9fbd Was bounded only by measurement (32 MiB copy against a 128 MiB append chunk, throwing frames logged, --gtest_repeat=20 20/20). The test now also asserts the hash table is fully filled, so an in-test oracle proves the refusal happened inside the collecting step. Set::insertFromColumns fills the table before calling appendSetElements, so this assertion fails if the refusal ever migrates earlier
3 💡 The intended Improvement should be Bug Fix, since the feature ships enabled in stable DISAGREE The query already fails by design on a memory limit; only the error text differs, which is the Improvement class. The one hard consequence, the abort, needs a debug or sanitizer build or the non-default abort_on_logical_error (src/Core/ServerSettings.cpp:1524). And no stable-release input reaching it exists to state: 2500 fault-injection iterations (1352 faulted queries, 594 faults inside appendSetElements) produced 0 occurrences. Re-tested independently on the second pass and unchanged
4 💡 EXPECT_NO_THROW(convertToFullIfWrapped()) cannot catch the failure it names in a build where a logical error aborts AGREE Noted, not blocking: it is a live assertion in a non-aborting build, and the graceful oracle in both flavours is the EXPECT_EQ above it on data size against the last offset. Kept as the verbatim production read site
5 💡 <Columns/IColumn.h> is not included although ColumnCheckpoints is now named directly (it arrives transitively); StorageBuffer.cpp:48 includes it AGREE Noted, not blocking: a second include buys no behaviour and the request was for a minimal change
6 💡 With one key column and a non-empty element column at the failing call, two of the three rollback facets have no live oracle: restoring a replaced column (Set.cpp:323-324) and cross-key skew AGREE Noted, not blocking: covering them needs a tuple set plus a second fault site, and the ask here was for a small test. Both are correct by construction rather than left open, since the rollback loop tries the replaced column first and only then the checkpoint, so a checkpoint taken on a swapped-out object is unreachable, and the loop runs over every key. The empty branch itself is exercised on the success path

What I checked rather than assumed, since the value of this pass is in the negatives: the rollback
repairs exactly this divergence (ColumnArray::rollback resizes the offsets and rolls the nested
column back, ColumnArray.cpp:537-541); the rollback itself cannot throw for any element column type
reachable from createColumn(), which matters because the inner failure path terminates, and the
default rollback is popBack(size() - checkpoint.size) over a grow-only loop so it cannot underflow;
the empty-element branch evaluates IColumn::mutate into a local before touching set_elements[i], so
that slot is never observably null; set_elements is mutated in exactly three places, so every append
site is covered and none was missed; StorageSet never calls fillSetElements(), so no corrupted set
can outlive a query that way; and the cross-query set cache publishes only after finishInsert() on the
success path (CreatingSetsTransform.cpp:271-275).

On whether a new gtest of this shape can be flaky, which is the fair question to ask of a
memory-limit fixture: MemoryTracker accounts the requested size rather than the realised footprint
(Allocator.cpp:180 calls CurrentMemoryTracker::alloc(new_size) before __real_realloc), and the
test forces untracked_memory_limit = 0, so sanitizer redzones, malloc bookkeeping and page rounding
fall outside the arithmetic that selects the fault site. The allocation that must succeed has a 2x
margin and the one that must fail overshoots by 4x, both being power-of-two functions of the fixture
data. That is why --gtest_repeat=20 is 20/20 as a property and not as luck.

One correction to my own first pass, since it is load-bearing for the question in the description: I
initially concluded that a partial filter can never be observed because the exception always fails its
query. That is wrong. ISimpleTransform::prepare() returns Finished from its output.isFinished()
branch without pushing output_data.exception (ISimpleTransform.cpp:26-32), and
BuildRuntimeFilterTransform::prepare() registers its filter on exactly that status
(BuildRuntimeFilterTransform.cpp:85-92). So the partial-filter class is real, pre-existing, and
reachable through paths this change does not touch, which is why it is a question in the description
rather than four more files here.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are
terminal per finding. Findings on hunks unchanged by the fix round are auto-dropped.

Session id: cron:clickhouse-review-slot-9:20260924-043500

@clickhouse-gh clickhouse-gh Bot closed this Sep 24, 2026
@clickhouse-gh clickhouse-gh Bot reopened this Sep 24, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes: unit_tests_dbms --gtest_filter='SetElements*', 230 ms, one memory hard limit sized in bytes, no probability anywhere.
b Root cause explained? Yes: ColumnArray::insertRangeFrom grows the nested column before appending its own offsets, so a failed allocation inside ColumnVariant's second fill loop left Set::set_elements holding a column whose nested data and offsets disagree; the Set outlives the failure, and the next read of it raises LOGICAL_ERROR.
c Fix matches root cause? Yes: the producer is made all-or-nothing with IColumn's existing checkpoint/rollback API. The validating ColumnArray constructor is untouched, and there is no consumer-side guard, no widened bound and no data reduction.
d Test intent preserved / new tests added? No existing test was changed. One new deterministic gtest, one TEST, in src/Interpreters/tests/.
e Both directions demonstrated? Yes: without the fix, exit 134 and offsets_column has data inconsistent with nested_column. Data size: 192, last offset: 128; with the fix it passes, --gtest_repeat=20 20/20. A negative control that disables only the rollback loop reddens identically. The test also pins the propagated error code (MEMORY_LIMIT_EXCEEDED) and the set's row count, so a refusal landing before the values are collected would no longer pass silently.
f Fix is general across code paths? One site by construction: grep -rn "appendSetElements" src/ returns the declaration, the definition and two callers. All three mutation sites in the function are inside the one try, and all three consumers are covered, including the merge path that no transform-level guard could reach.
g Fix generalizes across inputs? Type-agnostic by construction: the rollback is IColumn::rollback on whatever the element type created, so every column class is covered without enumeration, and LowCardinality/Nullable are already stripped upstream. The reverse risk is bounded: the only throw in popBack/rollback needs n > size(), unreachable because the checkpoints precede a loop that only grows. The test uses the hardest shape, Array(Variant(String, UInt64)) with both kinds present, which forces the general append path.
h Backward compatible? Yes, trivially: no setting, no default change, no serialization change, no header or ABI change, so no SettingsChangesHistory.cpp entry. Success-path behaviour is identical.
i Invariants and contracts preserved? Invariant: after this function returns or throws, every element column is internally consistent and all of them hold either the entry length or the appended length. On the error path the element is never observably null, the rollback cannot fail on the same memory limit (LockMemoryExceptionInThread), the original exception is logged before the rollback and rethrown unchanged (asserted by the test, not merely intended). Concurrency is unchanged (the state taken is call-local). The set is left consistent but possibly partial, which is the open question in the description.

Session id: cron:clickhouse-impl-slot-4:20260924-041400

@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [14586fc]

Summary: ❌

job_name test_name status info comment
Stress test (amd_msan) FAIL
Hung check failed, possible deadlock found FAIL cidb

AI Review

Summary

Set::appendSetElements now restores collected columns after a failed append and rethrows the original exception, with a focused memory-limit regression test. No actionable findings remain at 14586fc9695d77f59a51a93b8a05b37164b887b8. The prior partial-filter finding was withdrawn and its bot-authored thread resolved: a batch whose collection fails is not forwarded to the join, while exceptions during filter merging propagate out of prepare and fail the query.

Final Verdict

Status: ✅ Approve. No required changes.

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Sep 24, 2026
@groeneai
groeneai requested review from nickitat and vdimir September 24, 2026 05:12
Comment thread src/Interpreters/Set.cpp Resolved
@clickhouse-gh clickhouse-gh Bot added the comp-joins JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla... label Sep 24, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Commit 14586fc9695d77f59a51a93b8a05b37164b887b8 was not compared: the CI logs cluster did not answer (exception 241, code 500: { "meta": [ { "name": "file", "type": "LowCardinality(String)" …).

See the job log for details.

`Unit tests (amd_llvm_coverage)` failed the assertion that the set's hash table
holds every row of the refused batch:

    gtest_set_elements_rollback_exception_safety.cpp:116
      set.getTotalRowCount()  Which is: 64
      3 * rows_per_batch      Which is: 96

The count is short because the refusal arrived before the batch reached the
collection step, so the rollback under test never ran. That assertion exists to
catch exactly this, and every other assertion in the test held.

The cause is not the coverage build. The test armed a hard limit on the
process-wide memory tracker, which every thread of the test binary reports into,
and the 28980 unit tests run sequentially in one process: a pool left running by
an earlier test can spend the headroom between arming the limit and the append.
Allocating 96 MiB on another thread inside that window reproduces it on a debug
build, with getTotalRowCount() coming back 64 instead of 96, the CI signature
exactly. So the test was fragile on every build and coverage is only where it
landed.

The limit is now armed on this thread's own tracker, which no other thread
reports into, and the unit-test process leaves the process-wide limit unset, so
nothing else enforces one. The refused batch also drops from 32 values of 1 MiB
to 4 of 16 KiB: it only has to reach past the end of the buffer holding the
collected values, which leaves growing that buffer as the only allocation the
limit can refuse. Measured headroom window for the refusal landing on that
growth: 1 MiB to 128 MiB, against 48 MiB to 160 MiB before, with the limit now
at 32 MiB rather than at the old window's lower edge.

That also closes a way for this test to pass without testing anything: with the
large refused batch, any headroom below 48 MiB made the filter() copy preceding
the append the refused allocation, which leaves the collected values untouched
and all of the assertions holding.

src/Interpreters/Set.cpp is unchanged. Passes with the fix (--gtest_repeat=20,
20/20); without it exits 134 on "Data size: 136, last offset: 128"; with the
rollback loop body removed it fails identically; and the rollback's own logged
frames are Allocator::realloc <- ColumnString::doInsertRangeFrom <-
ColumnVariant::insertRangeFromImpl <- ColumnArray::doInsertRangeFrom <-
Set::appendSetElements.

Co-Authored-By: Claude Opus 5 <[email protected]>
Comment thread src/Interpreters/Set.cpp

size_t rows = holder.key_columns.at(0)->size();
for (size_t i = 0; i < keys_size; ++i)
try

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.

It should be fine to get an exception here; why should it be propagated up across the stack and cancel the query, like any other exception in other places?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two questions in one, and they have different answers.

Why the exception is caught at all. A plain exception propagated up the stack is what master already does: there is no try in appendSetElements on master (src/Interpreters/Set.cpp:274-291, bare insertRangeFrom at :287), and the query already fails with MEMORY_LIMIT_EXCEEDED. That is the state STID 2632-398f is reported from, so propagation on its own is not enough. What master leaves behind is a half-appended set_elements, and those columns outlive the frame that threw, because the Set is owned by the per-query runtime_filter_lookup. The abort then comes out of ColumnArray's own consistency check (src/Columns/ColumnArray.cpp:66-69) when the elements are read back, not while they are appended: the reported stack is ExactSetRuntimeFilter<false>::insert <- RuntimeFilter::merge <- RuntimeFilterLookup::add <- BuildRuntimeFilterTransform::prepare, and that merge reaches them through source.getValuesColumn() -> getSetElements().front(). So propagating the first exception demonstrably does not prevent the second read.

The new gtest is that end to end: with Set.cpp reverted it aborts with Data size: 136, last offset: 128, with the fix it passes, and with the rollback loop body replaced by (void)i; it aborts again. So the try buys the object invariant, and the throw; only keeps master's control flow unchanged.

Whether the query should die at all. Fair question, but it cannot be answered here: appendSetElements is shared by PreparedSets.cpp:179,197 (IN sets), CreateSetAndFilterOnTheFlyTransform.cpp:117 and RuntimeFilterLookup.cpp:361, and swallowing at this level would hand the index-analysis consumers a silently short set_elements instead of a failed query.

For the runtime filter alone it is reasonable, and the layer already has the mechanism: ExactSetRuntimeFilter::finishInsert(RuntimeFilterEvaluationState &) calls markKeySetDropped() plus releaseExactValues() when the exact set outgrows its limit, and a build that hit the memory limit is the same category. If you want the filter to fail open rather than fail the query, I will add it there and not in Set. That is the incomplete-build fence the PR body asks about; #120940 tried the transform-guard version and was closed unmerged, and this Set-level shape is what @ alexey-milovidov asked for on #119545 afterwards. Say which you prefer, and whether it belongs in this PR or on top of it.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 2cad1d1

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Performance Comparison (arm_release, master_head, 5/6) / read_in_reverse_order_final #0 dashboard-gate confirmed_regression: client_time 0.0029 -> 0.0036 s (+23.9%) on a FINAL ... LIMIT 10 query whose absolute time is 2.9 ms, while the shard's own report calls 0 of its 531 queries changed and the total 0.4% faster #121937 (merged 12:44:39Z), merged master @ 0739d7da0acfb424749e6972891d7946b9c7f470

Mergeable Check and PR are the praktika aggregators of that one row, not independent failures.
CH Inc sync is green on this head.

Why #121937 owns it, measured rather than assumed. praktika pinned this run's tree at
65e418553c6f (09:54:53Z), and #121937 "Perf tests: stop background merges before the measured
queries" merged at 12:44:39Z, so the fix was absent from the tree that failed (probe: the
keep_merges_running anchor is 0 in the tested tree, 0 in the pre-fix control, 2 at the fix and 2 on
live master). It is causal rather than same-area: read_in_reverse_order_final fills a
ReplacingMergeTree with 60M rows over two inserts and then measures only SELECTs, so it is exactly
the read-only shape that PR makes see "the part layout the setup left" with no merge competing for CPU,
and FINAL timing is a direct function of that layout. Master is now merged, so CI re-runs with it.

For the record, the other merged gate fix in this family, #121847, WAS present in the failing tree
(same probe: 1 in the tested tree, 0 in the pre-fix control), so it is not the owner of this row.

This PR's own diff cannot reach the flagged query: it changes Set::appendSetElements, and
SELECT x, y FROM read_in_reverse_order_final FINAL ORDER BY x DESC LIMIT 10 has no IN, no JOIN
and no set of any kind, so that function is never entered.

Session id: cron:our-pr-ci-monitor:20260924-143221

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 0739d7d

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task whose
fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Performance Comparison (arm_release, master_head, 6/6) / clickhouse_client_startup reference-binary version skew on master, and the sole red-maker. The shard's own Run Errors table reads Exception: Shell query failed on server 0 with exit code 40: Code: 552. DB::Exception: Unrecognized option '--text_index_postings_intersection_algorithm'. (UNRECOGNIZED_ARGUMENTS). Server 0 is the reference connection, whose binary this job downloaded from REFs/master/dc770fc7a5976b749268e0b71c1466a1ba95d322/masterci/build_arm_release (master commit dated 2026-09-24T13:45:24Z), while the option was added to the hard-coded client-option list in tests/performance/clickhouse_client_startup.xml by #121038, merged 2026-09-24T14:45:54Z as cf7023d4cef778caf78664805d65f089d027b2a5: compare(cf7023d4...dc770fc7) is behind with ahead_by 0, so the reference provably predates the setting, while compare(cf7023d4...0110158201cf) is ahead with behind_by 0, so the tested tree has it. That one row is what fails the shard: error_tests is the only term that can (ci/jobs/scripts/perf/report.py:396,750, ci/jobs/performance_tests.py:2732-2734, whose comment reads always green mode for the first time, unless errors), and report/errors.log was empty on this run. Nothing in this PR is reachable: the diff is src/Interpreters/Set.cpp plus one gtest, and the failing leaf is a client-startup shell script running SELECT 1 FORMAT Null. Breadth since that merge timestamp: 7 other pull requests and 2 true-master runs, both architectures, two shards a fix task is created (investigating at full effort, fixing-PR link to follow on this PR)
Performance Comparison (arm_release, master_head, 6/6) / sum_map #0 measurement noise, and not the red-maker: 0.134 -> 0.163 s, +1.216x, p 0.216 on SELECT minMap(key, val) FROM sum_map_100000 FORMAT Null, a query no Set is ever built for. It reads slower in this same shard on 4 unrelated pull requests inside 17 minutes on 2026-09-24, against 10586 success rows over 1569 distinct pull requests in 14 days, 1962 of them on true master a fix task is created (investigating at full effort, fixing-PR link to follow on this PR)
Mergeable Check, PR rollup: red only because of the shard above, no independent failure a fix task is created (investigating at full effort, fixing-PR link to follow on this PR)

Gates (a) to (d): 0 of 172 check runs queued or running (144 pass, 25 not selected, 3 fail),
Config Workflow, Style check, Finish Workflow and CH Inc sync all success, 44 min since the
last job finished (anchor 2026-09-24T19:51:13Z), and every failing row above has an owner.

Master merge deliberately not pushed: no fix exists yet to pick up, and the reference build is
chosen by the harness rather than by this branch, so a new head would not change the outcome.

Session id: cron:our-pr-ci-monitor:20260924-200137

@groeneai

Copy link
Copy Markdown
Collaborator Author

The fixing-PR link I promised in the ledger for 0739d7da0acf resolves to an already-merged external PR, so no separate fix PR is owed here.

Performance Comparison (arm_release, master_head, 6/6) / clickhouse_client_startup: the owner is #121038 (external, merged 2026-09-24T14:45:54Z as cf7023d4cef778caf78664805d65f089d027b2a5). It added --text_index_postings_intersection_algorithm to the hard-coded client-option list in tests/performance/clickhouse_client_startup.xml, which is still there on master at line 199, and the reference connection's binary came from a master build predating that merge, so server 0 rejected the option with Code: 552. The skew sits between the harness's reference build and the in-tree option list, neither of which this branch's head can influence, which is why I did not push a master merge.

Investigating that class did surface a separate live defect on the same error_tests path, now #122135: a do_not_check_in_pr setup failure is documented as reported rather than failing the check, but it reaches the test's stderr and reds the shard. It deliberately leaves the row above unchanged.

The other two rows need no fix PR either. sum_map #0 is a slower verdict at p = 0.216, and a master_head shard is failed only by error_tests, so it was never the red-maker; Mergeable Check and PR are rollups of the first row.

Session id: cron:our-pr-ci-monitor:20260925-053135

@rschu1ze

Copy link
Copy Markdown
Member

I agree with @vdimir, this is all terrible. Exceptions must bubble up unless there is a very good reason (destructor, noexcept).

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 comp-joins JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla... groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding pr-improvement Pull request with some product improvements v26.10-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants