Skip to content

Destroy the queued aggregate states when the merge of GROUP BY tables throws - #131595

Merged
nihalzp merged 2 commits into
ClickHouse:masterfrom
groeneai:aggregator-merge-destroy-queued-states
Nov 16, 2026
Merged

nihalzp merged 2 commits into
ClickHouse:masterfrom
groeneai:aggregator-merge-destroy-queued-states

Conversation

@groeneai

@groeneai groeneai commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #131315

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fixed a memory leak when the merge of the per-thread hash tables of GROUP BY failed with an exception, for example on max_memory_usage: the states of aggregate functions such as uniqExact or quantileExact that waited to be merged were never freed.

Description

The merges of the per-thread hash tables of GROUP BY (Aggregator::mergeDataImpl: serial, two-level bucket, fixed hash map; mergeSingleLevelPartitionsImpl: parallel hash partitions) take the state of a key found in two tables out of the source table and queue it for a batch merge (mergeAndDestroyDetachedBatch). Two throws leaked such states:

  • before the batch, e.g. MEMORY_LIMIT_EXCEEDED from HashTable::resize of the destination, nobody owned the queued states;
  • inside the batch, IAggregateFunctionHelper::mergeAndDestroyBatch and the -Tuple combinator did not destroy the rest of their batch when a merge threw.

On 26.8.37.168, SELECT k, quantileExact(number) FROM (SELECT number, toUInt64(number % 4) * 1000003 AS k FROM numbers_mt(16000000)) GROUP BY k with max_memory_usage = 200000000, max_threads = 4 and the serial single-level merge throws in mergeAndDestroyBatch; 20 such failures grow MemoryTracking of one clickhouse local to 399.8 MiB, while 20 failures in the build phase stay at 93.5 MiB.

The fix destroys the queued states in a catch around the collection (destroyDetachedSources); mergeAndDestroyDetachedBatch owns the batch from its call on, so that catch never sees it. mergeAndDestroyBatch and -Tuple destroy the rest of their batch with destroyBatch.

Validation: the test 05638_aggregator_merge_exception_destroys_queued_states throws from two ONCE failpoints, after a duplicate state is queued (six cases) and inside mergeAndDestroyBatch after its first row (both merges and quantileExactTuple), and counts the LeakSanitizer reports. On ASan it fails without either catch of the batch (leak) or with the batch cleared after its call (double free).

Not changed here: the conversion of the merged table (convertToBlockImplFinal) can leak destination states the same way under max_memory_usage.

Raised in the review of #131315: #131315 (comment)

🤖 Generated with Claude Code


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

Version info

  • Merged into: 26.11.1.2406-master (included in 26.11 and later)
  • Backported to: 26.10.5.49, 26.9.31.14, 26.8.39.13

… throws

The map `mergeDataImpl` (serial single-level merge, two-level bucket merge,
parallel fixed hash map merge) and the non-indexed loop of
`mergeSingleLevelPartitionsImpl` take the state of a key found in both tables
out of the source table (`src = nullptr`) and queue it in a local
`PaddedPODArray` for `mergeAndDestroyDetachedBatch`. Until that call nothing
owns the queued states: a throw in between, e.g. `MEMORY_LIMIT_EXCEEDED` from
the destination `HashTable::resize`, leaked their heap buffers, since the
catches destroyed only the deferred pairs. ClickHouse#117153 made the window after the
batch starts exception-safe; this closes the collection window before it.

Extract the cleanup loop of `mergeAndDestroyDetachedBatch` into
`destroyDetachedSources` and call it from a catch around the collection of
`mergeDataImpl` (the JIT merge and the batch call stay outside the try, the
batch owns the states from there) and from the existing catch of the
partition merge. `flush_merges` clears its arrays in a `SCOPE_EXIT`, because
the batch takes the states also when it throws, so a state is never destroyed
twice. Deferred pairs come only from batches that started and the queued
states only from batches that did not, so the two cleanups are disjoint.

The new ONCE failpoint `aggregator_merge_collect_states_throw` throws at the
end of a collection while states are queued. The test runs it on six paths in
`clickhouse local`, whose LeakSanitizer check at exit aborts on a leak.

`IAggregateFunctionHelper::mergeAndDestroyBatch` and the `-Tuple` combinator
also destroy the rest of their batch when a merge throws, as
`mergeAndDestroyBatchOrDefer` does; the second ONCE failpoint
`aggregator_merge_batch_throw` tests a throw inside the batch in both merges.

Related: ClickHouse#131315 (comment)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (2 rounds, head fe5cd48): 3 ❌ and 1 ⚠️ fixed, 1 💡 declined, 1 💡 noted; round 2 clean
Finding Verdict
❌ A throw inside a function's batch merge leaked the rest of that batch (plain mergeAndDestroyBatch, no catch) AGREE, fixed
❌ -Tuple combinator: nested functions after the one that threw were not destroyed AGREE, fixed
❌ No test of a throw inside the merge (double destroy unguarded) AGREE, failpoint + 2 variants
⚠️ Test fixture: max_threads_min_free_memory_per_thread can drop the query to one thread, so no merge AGREE, pinned to 0
💡 Category should be Bug Fix DISAGREE: a leak after a failed query is not a wrong result, data loss or crash
💡 The catches inside mergeAndDestroyBatch and -Tuple have no CI test Noted: checked with max_memory_usage (master leaks 10 to 40 MiB, the fix is clean in 23 runs); a failpoint would sit in the per-row merge loop

Not changed here (different code): convertToBlockImplFinal has a similar window for destination states.

Session id: cron:clickhouse-review-slot-8:20261114-111700

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. Two ONCE failpoints: aggregator_merge_collect_states_throw throws at the end of a collection while states are queued, aggregator_merge_batch_throw inside the batch merge after its first function. On ASan, without the collection cleanup the six collection variants leak on every run (LeakSanitizer); with the batch arrays cleared only after the batch returns, the two batch variants abort on a double free (AddressSanitizer).
b Root cause explained? mergeDataImpl and the non-indexed loop of mergeSingleLevelPartitionsImpl null the source cell of a duplicate key and queue its state for mergeAndDestroyDetachedBatch. A throw before that call (destination HashTable::resize, a push_back) left the queued states with no owner. Inside the batch, IAggregateFunctionHelper::mergeAndDestroyBatch had no catch, so a throw in mergeImpl at row i left rows i.. of that function, and the -Tuple combinator the nested functions after the one that threw.
c Fix matches root cause? Yes. Each exception path destroys exactly the states nobody else owns: the collection catch those that never reached the batch (existing cleanup loop, extracted into destroyDetachedSources; the arrays are cleared when flush_merges returns or throws, and the mergeDataImpl try ends before the batch), mergeAndDestroyBatch the rest of its rows, -Tuple the later nested functions, as mergeAndDestroyBatchOrDefer already did.
d Test intent preserved / new tests added? New test 05638_aggregator_merge_exception_destroys_queued_states, eight variants: a throw after a duplicate state is queued (partition merge with UInt64, String and Nullable keys, serial, two-level bucket, fixed hash map) and a throw inside the batch merge (partition and serial). No existing test changed.
e Both directions demonstrated? Collection cleanup removed: six variants FAIL (LeakSanitizer). Arrays cleared after the batch: two batch variants FAIL (double free). Fix: OK, 50 of 50 on ASan and on debug. Without failpoint, max_memory_usage alone: master leaks 10 to 40 MiB when QuantileExact::mergeImpl throws inside mergeAndDestroyBatch, the -Tuple combinator without its catch 10 to 30 MiB; the fix is clean in all 23 runs.
f Fix is general across code paths? Both collections that queue detached states (partition merge: cell tables, string tables, null slot; mergeDataImpl: serial, bucket, fixed hash map) and both implementations of mergeAndDestroyBatch (the helper and -Tuple). The indexed partition merge, mergeDataNullKey, mergeAndDestroyRowOrDefer and the adaptive merge keep the state in the source until it is merged.
g Fix generalizes across inputs (params/datatypes/wrappers)? Keys: UInt64, String, UInt16 (fixed hash map), Nullable(UInt64). Functions: two quantileExact (heap arrays), quantileExactTuple, uniqExact with deferred two-level sets, JIT-compiled sum next to a non-compiled function.
h Backward compatible? (maintainer-approved exception only) Yes. No setting, format or protocol change; results without failures are identical to master.
i Invariants and contracts preserved? A source state that reaches the batch is destroyed exactly once by it on every exit; one that has not is destroyed by the collection catch. Within the batch, a function destroys (or defers) all its rows also when it throws, and the caller destroys the following functions. AddressSanitizer is clean on every throw of the fix; destroy is noexcept, so no catch can throw.

Session id: cron:clickhouse-impl-slot-40:20261114-094300

@clickhouse-gh

clickhouse-gh Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [69cf579]

Summary: ✅


AI Review

Summary

The PR frees detached aggregate states when collecting or merging per-thread GROUP BY tables throws, including failures inside an aggregate's batch merge and the -Tuple combinator. No actionable findings at 69cf579937163f80a616f663d560cfb2878ce1f1; the earlier discussion's requested changes are present.

Missing context / blind spots
  • ⚠️ The new 05638_aggregator_merge_exception_destroys_queued_states test was not rerun locally because this checkout has no built ClickHouse binary. The available CI report contained no result for that test. Runtime validation relies on the author's reported ASan/debug runs and checks that removing the cleanup makes the test fail.
Final Verdict

✅ Approve. No new inline findings.

@clickhouse-gh clickhouse-gh Bot added pr-improvement Pull request with some product improvements can be tested Allows running workflows for external contributors comp-aggregation GROUP BY / aggregation framework (hash tables, spilling, external aggregation). labels Nov 14, 2026
@nihalzp nihalzp self-assigned this Nov 14, 2026
@nihalzp

nihalzp commented Nov 14, 2026

Copy link
Copy Markdown
Member

@groeneai A few things:

  • Let's use the Bug Fix category: the fix should be backported to 26.8.
  • Let's use IAggregateFunction::destroyBatch in the three new destroy loops, destroyDetachedSources and the catch blocks of IAggregateFunctionHelper::mergeAndDestroyBatch and AggregateFunctionTuple::mergeAndDestroyBatch, instead of calling destroy per state.
  • Let's add a comment at the SCOPE_EXIT in flush_merges and at the batch merge of mergeDataImpl: mergeAndDestroyDetachedBatch owns the batch from the call on, also when it throws, so the catch must not see it. The new catch of the partition merge also needs the one-line reason that the one in mergeDataImpl has.
  • aggregator_merge_batch_throw throws after the mergeAndDestroyBatch of a function returned, so the new catch blocks inside IAggregateFunctionHelper::mergeAndDestroyBatch and the -Tuple combinator never run in the test. Let's add a throw inside the batch after its first row, and a case with a -Tuple function such as quantileExactTuple.
  • Let's update the nullable_default case. Its key is never NULL, so it takes the same path as partition, and Use Adaptive Aggregator for GROUP BY of single Nullable key #131551 makes the adaptive aggregator take a single Nullable key, whose index-based merge never queues states.
  • For the test, let's reuse the pattern of 04812_foreach_combinator_nested_state_leak.sh: route each run's sanitizer report to its own log_path and count the leak reports, so one reference fits every build. And let's group the cases into fewer clickhouse local processes, because each start is expensive under ASan.

@clickhouse-gh

clickhouse-gh Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 69cf57993 with master 4ba5be0b3 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 829.00 MiB 827.62 MiB -1.38 MiB (-0.17%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes

144 object files changed (+1.81 MiB total), 0 added.

Object file Master PR Δ
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionAvgWeighted.c… 13.68 MiB 13.82 MiB +145.50 KiB (+1.04%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionUniq.cpp.o 13.68 MiB 13.81 MiB +136.02 KiB (+0.97%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionCorr.cpp.o 7.12 MiB 7.23 MiB +112.16 KiB (+1.54%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionsArgMinArgMax… 16.09 MiB 16.19 MiB +110.16 KiB (+0.67%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionCovar.cpp.o 6.93 MiB 7.02 MiB +91.62 KiB (+1.29%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionGroupArray.cp… 4.55 MiB 4.62 MiB +64.91 KiB (+1.39%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionQuantileExact… 3.17 MiB 3.22 MiB +53.06 KiB (+1.63%)
src/CMakeFiles/dbms.dir/Interpreters/Aggregator.cpp.o 28.62 MiB 28.66 MiB +44.93 KiB (+0.15%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionSparkbar.cpp.o 5.35 MiB 5.40 MiB +44.90 KiB (+0.82%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionQuantileExact… 7.03 MiB 7.08 MiB +42.66 KiB (+0.59%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionQuantileExact… 2.57 MiB 2.61 MiB +41.21 KiB (+1.57%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionQuantileExact… 2.55 MiB 2.59 MiB +41.11 KiB (+1.57%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionSum.cpp.o 3.90 MiB 3.94 MiB +39.72 KiB (+0.99%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionSequenceMatch… 2.12 MiB 2.15 MiB +32.36 KiB (+1.49%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionGroupBitmap.c… 2.20 MiB 2.23 MiB +25.49 KiB (+1.13%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionQuantileExact… 1.76 MiB 1.78 MiB +25.34 KiB (+1.41%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionQuantileExact… 1.75 MiB 1.78 MiB +25.34 KiB (+1.41%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionRegr.cpp.o 5.95 MiB 5.97 MiB +24.41 KiB (+0.40%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionBitwise.cpp.o 2.20 MiB 2.22 MiB +23.96 KiB (+1.07%)
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionGini.cpp.o 1.19 MiB 1.21 MiB +23.20 KiB (+1.90%)

711 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Slowest function optimization changes (ThinLTO)

Median per-function time ratio to the master baseline: programs/clickhouse ×0.59, programs/clickhouse-keeper ×0.65 (each binary is linked separately, on a different machine and with different build flags); deltas below are relative to it.

Binary Function Master PR Δ vs median
programs/clickhouse _ZN6detail10static_forITk7is_enumN2DB23AttributeUnderlyingTypeEZNS1_29callOnDictionaryAttributeType… 3.3 s 7.0 s +5.0 s (+254%)
Compile time of recompiled translation units

395 translation units recompiled, 3089 s compile time in total, 395 of them have a recent master baseline.

Job report

…the batch

`destroyDetachedSources` and the catches of
`IAggregateFunctionHelper::mergeAndDestroyBatch` and of the `-Tuple`
combinator destroy their states with `destroyBatch`.

`aggregator_merge_batch_throw` now throws inside
`IAggregateFunctionHelper::mergeAndDestroyBatch` before the merge of its
second row (`IAggregateFunction::injectMergeBatchFault`, out of the header),
so the catches of the function and of `-Tuple` run in the test, which gains a
`quantileExactTuple` case. Before, it threw after the batch of a function had
returned.

The NULL key case has NULL keys and pins the non-adaptive partition merge,
because the adaptive aggregator merges by cell index and never queues states.
The test routes the sanitizer report of each `clickhouse local` to its own log
and counts the leak reports, so one reference fits every build, and runs the
cases in two processes.

Comments: `mergeAndDestroyDetachedBatch` owns the batch from its call on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

Thanks, all six are in 69cf579:

  • The category is now Bug Fix. On 26.8.37.168, 20 failures of a quantileExact GROUP BY that throws in mergeAndDestroyBatch grow MemoryTracking of one clickhouse local to 399.8 MiB, against 93.5 MiB for 20 failures in the build phase (query in the description). I can't add v26.8-must-backport myself: I have no label permission on this repo.
  • destroyDetachedSources and the two catch blocks use destroyBatch.
  • The ownership comment is at the SCOPE_EXIT of flush_merges and before the batch merge of mergeDataImpl, and the catch of the partition merge has its one-line reason.
  • aggregator_merge_batch_throw now throws inside IAggregateFunctionHelper::mergeAndDestroyBatch before the merge of its second row (IAggregateFunction::injectMergeBatchFault, defined in the .cpp) instead of after the function returned, and a quantileExactTuple case is added. On ASan the test fails without the destroyBatch of the helper's catch or without the loop of the -Tuple one (one leak report each), and with the batch cleared after the call instead of in the SCOPE_EXIT (double free).
  • nullable_default is now partition_nullable: one row in ten has a NULL key, and it pins enable_adaptive_aggregator = 0 and the partition merge, so Use Adaptive Aggregator for GROUP BY of single Nullable key #131551 does not change its path.
  • The test follows 04812_foreach_combinator_nested_state_leak.sh: each clickhouse local writes its sanitizer report to its own log_path and the leak reports are counted, and the nine cases run in two processes, one per failpoint (6.6 s on ASan, 2 s on debug).

@clickhouse-gh clickhouse-gh Bot added pr-bugfix Pull request with bugfix, not backported by default and removed pr-improvement Pull request with some product improvements labels Nov 14, 2026
@nihalzp
nihalzp added this pull request to the merge queue Nov 16, 2026
Merged via the queue into ClickHouse:master with commit 0c3ba30 Nov 16, 2026
210 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 16, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Nov 16, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Nov 16, 2026
Resolve the five conflicts of the 26.8 cherry-pick of ClickHouse#131595. They are
all regions where master has code that 26.8 does not have: the deferral
of large merges (ClickHouse#117153: mergeAndDestroyBatchOrDefer, DeferredMerges,
mergeAndDestroyDetachedBatch and its catch), isSelfMerge (ClickHouse#130678), the
bound of zero-sized nested states (ClickHouse#130120), and the partition-by-partition merge of
the adaptive aggregator (ClickHouse#129565). None of them is labelled for 26.8, and
the resolution takes none of them.

26.8 has no catch around the per-function loop of the batch merge (master
got it in ClickHouse#117153), so a throw in the merge of one function would still
leak the queued states of every function after it. The resolution adds
a 26.8 mergeAndDestroyDetachedBatch, the master function without the
deferral: the per-function loop, and a catch that destroys the states of
the following functions. The map mergeDataImpl (also the JIT path) and
the flush of mergeSingleLevelPartitionImpl call it. The collection loop
of mergeSingleLevelPartitionImpl is wrapped in the try of ClickHouse#131595, so it
is re-indented.

In IAggregateFunctionHelper::mergeAndDestroyBatch the 26.8 assertion is
kept (no isSelfMerge). AggregateFunctionTuple.cpp and the test merge
cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
nihalzp pushed a commit that referenced this pull request Nov 17, 2026
Resolve the five conflicts of the 26.9 cherry-pick of #131595. They are
all regions where master has code that 26.9 does not have: the deferral
of large merges (#117153: mergeAndDestroyBatchOrDefer, DeferredMerges,
mergeAndDestroyDetachedBatch and its catch), isSelfMerge (#130678), the
bound of zero-sized nested states (#130120), and the partition-by-partition merge of
the adaptive aggregator (#129565). None of them is labelled for 26.9, and
the resolution takes none of them.

26.9 has no catch around the per-function loop of the batch merge (master
got it in #117153), so a throw in the merge of one function would still
leak the queued states of every function after it. The resolution adds
a 26.9 mergeAndDestroyDetachedBatch, the master function without the
deferral: the per-function loop, and a catch that destroys the states of
the following functions. The map mergeDataImpl (also the JIT path) and
the flush of mergeSingleLevelPartitionImpl call it. The collection loop
of mergeSingleLevelPartitionImpl is wrapped in the try of #131595, so it
is re-indented.

In IAggregateFunctionHelper::mergeAndDestroyBatch the 26.9 assertion is
kept (no isSelfMerge). AggregateFunctionTuple.cpp and the test merge
cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
nihalzp pushed a commit that referenced this pull request Nov 17, 2026
Resolve the five conflicts of the 26.10 cherry-pick of #131595. They are
all regions where master has code that 26.10 does not have: the deferral
of large merges (#117153: mergeAndDestroyBatchOrDefer, DeferredMerges,
mergeAndDestroyDetachedBatch and its catch), isSelfMerge (#130678), the
bound of zero-sized nested states (#130120), and the partition-by-partition merge of
the adaptive aggregator (#129565). None of them is labelled for 26.10, and
the resolution takes none of them.

26.10 has no catch around the per-function loop of the batch merge (master
got it in #117153), so a throw in the merge of one function would still
leak the queued states of every function after it. The resolution adds
a 26.10 mergeAndDestroyDetachedBatch, the master function without the
deferral: the per-function loop, and a catch that destroys the states of
the following functions. The map mergeDataImpl (also the JIT path) and
the flush of mergeSingleLevelPartitionImpl call it. The collection loop
of mergeSingleLevelPartitionImpl is wrapped in the try of #131595, so it
is re-indented.

In IAggregateFunctionHelper::mergeAndDestroyBatch the 26.10 assertion is
kept (no isSelfMerge). AggregateFunctionTuple.cpp and the test merge
cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
robot-clickhouse added a commit that referenced this pull request Nov 17, 2026
Cherry pick #131595 to 26.8: Destroy the queued aggregate states when the merge of GROUP BY tables throws
robot-clickhouse added a commit that referenced this pull request Nov 17, 2026
robot-clickhouse added a commit that referenced this pull request Nov 17, 2026
Cherry pick #131595 to 26.9: Destroy the queued aggregate states when the merge of GROUP BY tables throws
robot-clickhouse added a commit that referenced this pull request Nov 17, 2026
robot-clickhouse added a commit that referenced this pull request Nov 17, 2026
Cherry pick #131595 to 26.10: Destroy the queued aggregate states when the merge of GROUP BY tables throws
robot-clickhouse added a commit that referenced this pull request Nov 17, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Nov 17, 2026
clickhouse-gh Bot added a commit that referenced this pull request Nov 17, 2026
Backport #131595 to 26.9: Destroy the queued aggregate states when the merge of GROUP BY tables throws
clickhouse-gh Bot added a commit that referenced this pull request Nov 17, 2026
Backport #131595 to 26.10: Destroy the queued aggregate states when the merge of GROUP BY tables throws
clickhouse-gh Bot added a commit that referenced this pull request Nov 17, 2026
Backport #131595 to 26.8: Destroy the queued aggregate states when the merge of GROUP BY tables throws
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-aggregation GROUP BY / aggregation framework (hash tables, spilling, external aggregation). pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v26.8-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants