Skip to content

More settings to randomize - #106734

Open
PedroTadim wants to merge 18 commits into
masterfrom
randomize-more
Open

PedroTadim wants to merge 18 commits into
masterfrom
randomize-more

Conversation

@PedroTadim

@PedroTadim PedroTadim commented Jun 8, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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

The stateless-test runner now randomizes about 100 more query-level and MergeTree settings, among them the DP join-order algorithms (dpsub, dphyp), runtime join filters, lazy FINAL, the text-index caches, the adaptive aggregator, Iceberg and Paimon pruning, and partition-independent execution. Settings that are not transparent to queries, or that currently trigger known bugs, stay commented out with the reason next to them, and tests whose output depends on one of the new settings pin it.


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

@clickhouse-gh

clickhouse-gh Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [46aed86]

Summary: ❌

job_name test_name status info comment
Stateless tests (arm_asan_ubsan, targeted) FAIL
05813_json_conversion_datetime_keeps_instant FAIL cidb
05813_json_conversion_datetime_keeps_instant FAIL cidb
05839_in_set_elements_from_new_rows FAIL cidb
05813_json_conversion_datetime_keeps_instant FAIL cidb
05813_json_conversion_datetime_keeps_instant FAIL cidb
Too many test failures FAIL cidb
Stateless tests (amd_debug, parallel) FAIL
05632_kafka_insert_undelivered_messages FAIL cidb
Stateless tests (arm_binary, parallel) FAIL
05813_json_conversion_datetime_keeps_instant FAIL cidb
05632_kafka_insert_undelivered_messages FAIL cidb
Stateless tests (arm_binary, sequential, 1/2) FAIL
05346_url_query_condition_cache FAIL cidb
Stateless tests (amd_asan_ubsan, db disk, distributed plan, targeted) FAIL
05813_json_conversion_datetime_keeps_instant FAIL cidb
05839_in_set_elements_from_new_rows FAIL cidb
05839_in_set_elements_from_new_rows FAIL cidb
05813_json_conversion_datetime_keeps_instant FAIL cidb
05813_json_conversion_datetime_keeps_instant FAIL cidb
Too many test failures FAIL cidb
Fast test (arm_darwin) DROPPED
Build (arm_darwin) DROPPED
Build (arm_fuzzers) DROPPED
Stateless tests (amd_debug, sequential) DROPPED
Stateless tests (amd_debug, distributed plan, s3 storage, parallel) DROPPED

AI Review

Summary

Expands query and MergeTree setting randomization and pins affected stateless tests. One new Major remains: the AutoPR pricing fixture pins only one of the adaptive aggregator's two freeze bounds. The latest Praktika report reports 15,403 passed tests and no failures, but the setting combinations below can still invalidate assertions or bypass targeted regression paths. Previously dismissed concerns that still hold are retained here without reopening their threads.

Findings

⚠️ Majors

Test filenames below are relative to tests/queries/0_stateless/.

  • New — 05480_autopr_plan_based_group_by_order_by_top_k.sql:27: the byte bound defeats the new key-bound pin. An allowed combination is adaptive_aggregator_freeze_threshold_bytes = 1, adaptive aggregation enabled, and thaw disabled. Aggregator::adaptiveFreezeBoundReached freezes producers after their first block despite the pinned key threshold. Later blocks stage keys through executeFrozen, bypassing the group-key Top-K heap; the enlarged aggregation output can make AutoPR decline queries whose assertions require AutoParallelReplicasApplied = 1. Also pin the byte bound to 0 or an appropriately large value. Inline finding.

  • tests/clickhouse-test:2346: the text-index warm-cache assertion still permits cold headers. 05218_text_index_substreams_opened_lazily.sh pins token and postings caches but leaves use_text_index_header_cache inherited. A disabled draw creates a fresh per-query header cache; the measured query loads headers for 30 parts despite requiring fewer than 10 file opens. Pin the header cache in SETTINGS_COMMON. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4248519189]

  • tests/clickhouse-test:2224: seal-gated reading still needs verification with early build termination. FillingRightJoinSideTransform::prepare can close its input and emit the seal after join_overflow_mode = 'break', before canceled upstream filter builders publish their partial filters. RuntimeFilterReadRangesRefiner::setFilterImpl still requires a ready filter, and 04337_runtime_filter_lookup_before_finished.sql.j2 explicitly disables the gate for this reason. Keep the generator disabled, exclude this combination, or demonstrate that seal emission waits for cancellation publication. This remains a source-traced risk, not an independently reproduced failure. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4513282188]

  • tests/clickhouse-test:2545: adaptive spilling can invalidate the no-spill memory-limit oracle. 00877_memory_limit_for_new_delete.sql expects MEMORY_LIMIT_EXCEEDED and disables external-aggregation thresholds, but not enable_adaptive_memory_spill_scheduler. The scheduler can spill through AggregatingTransform independently of those thresholds, potentially allowing the query to finish. Pin the scheduler off in fixtures that require an allocation-limit exception; the allocator-dependent outcome still needs a focused run. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4523830525]

  • tests/clickhouse-test:2308: the throwing-predicate regression can skip predicate propagation. 04904_propagate_predicate_across_equi_join_throwing_predicate.sql never enables query_plan_propagate_predicate_across_join. A disabled draw skips the pass, so both negative checks can pass without testing its safety guards. Pin the pass on for these checks. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r3980318993]

  • tests/clickhouse-test:2480: atomic population regressions can execute legacy population. The positive arms in 04494_atomic_populate_materialized_view_parallel_replicas.sql, 04493_atomic_populate_materialized_view_features.sql, 04492_create_or_replace_materialized_view_populate_keeps_subscription.sql, and 04493_create_or_replace_materialized_view_populate_keeps_subscription_concurrent.sh still inherit materialized_views_populate_atomically. Drawing 0 bypasses the pinned-snapshot or temporary-view publication behavior while row-count checks can remain green. Pin 1 before the atomic arms, retaining explicit legacy controls. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r3980319013] [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r3999709096] [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4126486402]

  • tests/clickhouse-test:2482: mutation-pruning coverage can bypass pruning. The heavyweight delete in 05229_minmax_index_order_after_modify_column_after.sql still inherits optimize_mutations_with_partition_pruning. With it disabled, mutating every part produces the expected rows without consulting the reordered min-max slots. Pin pruning on for that arm. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4075428354]

  • 04927_cascades_aggregation_pushdown_correctness.sql:70 and 05048_cascades_aggregation_pushdown_correctness_2.sql: pinned canaries do not establish the executed path. Only the explanatory plans force cascades_aggregation_pushdown = 1. When the inherited setting is disabled, the executed comparisons omit aggregation pushdown while independently pinned canaries still pass. Enable pushdown for the optimized execution arms; preserve the explicit classic controls. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4304277569]

  • tests/clickhouse-test:2350: shared lazy-JOIN indexes can disappear from their regression. 04628_lazy_replicated_array_slice_element.sql.j2 has three probe columns but inherits query_plan_min_columns_for_join_lazy_indexing. Draws 0, 4, or 5 prevent the intended shared-index ColumnReplicated path while result comparisons can still pass. Pin the threshold to 3 for that reproducer. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4326852888]

  • tests/clickhouse-test:2413: Top-K cache invalidation tests can run with caching disabled. 05397_iceberg_top_k_query_condition_cache_mutable_metadata.sh and 05406_iceberg_top_k_query_condition_cache_rename.sh enable the general query-condition cache but still inherit its Top-K switch. A disabled draw suppresses cache entries, making the second read unable to detect stale metadata-derived predicates. Pin use_query_condition_cache_for_top_k = 1 in both fixtures. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4424803297]

  • tests/clickhouse-test:2495: the thaw regression can forbid thawing. 04605_adaptive_aggregator_thaw.sql leaves adaptive_aggregator_disable_thaw inherited. A true draw makes adaptiveMayThaw false, so result equality no longer exercises the intended transition. Pin this switch to 0 in the thaw fixture. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4440612449]

  • tests/clickhouse-test:2844: mutation coalescing limits can disable the explicitly enabled arm. 05256_coalesce_row_mask_updates.sql still inherits all coalescing limits. Draws such as one key, one command, or zero AST/key bytes prevent coalesceSingletonRowMaskUpdates from running, including on the assignment-alias regression's enabled table. Pin enabled fixtures to usable key, command, AST-byte, and key-byte limits while preserving the disabled control. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4443784073]

  • tests/clickhouse-test:2201: the parallel-slot accounting regression can use a serial table. 04904_explain_analyze_join_parallel_hash_unique_keys.sql forces the algorithm and threshold but still inherits hash_join_layout. The serial draw overrides parallel layout and produces the expected unique-key count without exercising per-slot summation. Pin hash_join_layout = 'parallel' in the parallel-layout arms. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4583635234]

  • tests/clickhouse-test:2352: the unmatched-capture JIT arm can repeat the uncompiled path. 04691_replace_regexp_unmatched_capture_group_ubsan.sql sets the compilation-count threshold to zero but leaves compile_regular_expressions inherited. A disabled draw prevents compilation and bypasses the compiled capture-handling regression. Enable compilation on the JIT arm. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4613476739]

  • tests/clickhouse-test:2206: packed-key prefetch comparisons can use serialized keys on both sides. The optimized fixed-width-plus-String arms in 05618_packed_string_keys_aggregation_prefetch_kept_keys.sql do not enable enable_fixed_and_packed_string_keys_in_aggregation. A disabled draw selects prealloc_serialized instead of the targeted packed methods, so equality can pass without their prefetch loops. Enable the setting for optimized arms and retain disabled controls. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4628552819]

  • tests/clickhouse-test:2367: the file-count cache contamination regression can avoid its cache. 05341_s3_cluster_bucket_split_count.sh checks file/bucket/file reads but still inherits use_cache_for_count_from_files. Drawing 0 suppresses both writes and lookups, so matching counts no longer test contamination of the whole-file cache entry. Pin the cache on in this fixture. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4631775368]

  • tests/clickhouse-test:1986: the reader cache-front regression can merge away the separate open. 05395_reader_executor_long_connection_cache_front.sql still inherits reader_executor_min_bytes_for_seek. The 40 MiB draw bridges its roughly 7 MiB gap, allowing reuse of a connection spanning both ranges instead of opening at the cache segment's committed front. Its result assertions can pass without the faulty bound calculation. Pin the intended 2097152 threshold. [dismissed by author -- https://github.com/More settings to randomize #106734#discussion_r4670498801]

Tests
  • ⚠️ No ClickHouse binary is available in this review job. Validate the AutoPR fixture with the byte freeze bound at 1, adaptive aggregation enabled, and thaw disabled; validate the text-index fixture with its header cache disabled. These combinations are not established by a green randomized run.
  • ⚠️ The seal-gating early-termination and spill/OOM concerns need focused runtime evidence or explicit exclusion of the incompatible setting combinations.
Final Verdict

Status: ⚠️ Request changes

Pin the AutoPR byte freeze bound, preserve the cited regression paths and deterministic assertions, and verify or exclude the two source-traced failure combinations. The new finding was posted inline; dismissed threads were left untouched.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jun 8, 2026
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
alexey-milovidov pushed a commit that referenced this pull request Jun 20, 2026
This is a pipeline-deadlock regression test (issue #57728): it checks that a
full_sorting_merge join with the PingPongProcessor / FilterBySetOnTheFly
optimization no longer hangs. The deadlock detection is driven entirely by the
pinned query-level SETTINGS (join_algorithm = 'full_sorting_merge',
query_plan_join_swap_table = 0, max_threads = 2) and is independent of the
table's on-disk layout.

CI randomizes MergeTree settings per run, and two unrelated randomized
combinations break this test without exercising any new pipeline behavior:

  1. index_granularity = 1 with min_bytes_for_wide_part = 0 produces ~1M marks
     for the 1M-row tables, making each INSERT ~20x slower. On the slow
     amd_msan / WasmEdge runner this pushes the total runtime past the 180s
     timeout (seen on PR #101143). The query still returns the correct result;
     it is pure slowness, not a deadlock.
  2. part_minmax_index_columns = 'with_block_number_offset' without
     enable_block_number_column / enable_block_offset_column is rejected at
     CREATE TABLE with BAD_ARGUMENTS (seen on PR #106734, amd_tsan and
     arm_binary).

Pinning a single setting cannot cover both classes, and the test does not
depend on MergeTree storage randomization for any of its coverage. Add the
no-random-merge-tree-settings tag, which disables only MergeTree-settings
randomization while leaving session-level setting randomization (where the
pipeline / join behavior lives) intact. The same tag is used by sibling tests
(00564, 00926, 02981) for the same reason.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
Randomize more session and `MergeTree` settings in `clickhouse-test`, and keep the
tests whose observable output (plans, part formats, cache or `ProfileEvents` counts)
depends on them stable by pinning those settings in the tests:

- Randomize new session settings, among them `enable_fixed_and_packed_string_keys_in_aggregation`,
  `enable_parallel_single_level_merge_by_index`, `merge_tree_read_end_tasks_per_stream`,
  `load_marks_asynchronously`, the columns cache write limits, the hash join and text index
  settings, `use_datalake_metadata_statistics` and four settings that do not change results.
- Randomize new `MergeTree` settings, among them `max_row_mask_update_coalescing_ast_bytes`,
  `max_row_mask_update_coalescing_key_bytes` and `max_memory_ratio_to_activate_adaptive_write_buffer`,
  and follow the rename to `secondary_indexes_enable_bulk_filtering`.
- Make the randomizer respect the `ReaderExecutor` plan-look-ahead constraint and remove the dead
  DPsub join-order-limit clamp.
- Pin the randomized settings in the tests that check what they change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread tests/clickhouse-test Resolved
Comment thread tests/clickhouse-test Resolved
PedroTadim and others added 9 commits November 20, 2026 08:13
…odings of one row group

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…checks the lazy read steps

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…_filter

The test checks which runtime filter `EXPLAIN ANALYZE` reports. Settings randomized by #106734 change it,
each by design: a low `join_runtime_filter_exact_values_limit` or `join_runtime_bloom_filter_bytes` (the
byte limit of the exact set) turns the exact set into a Bloom filter, and `hash_join_layout = 'parallel'`
or `enable_join_fixed_hash_table_conversion = 0` leaves no `FixedHashMap` for the shared filter.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=106734&sha=757685076585b406a859818f17520bf09ce1941e&name_0=PR
PR: #106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each failure reproduces only with one randomized setting and changes what the test
observes, not the query results:

- `05558_trivial_group_by_limit_constraints`: `optimize_trivial_group_by_limit_query = 0`
  makes `max_rows_to_group_by` throw, as the test asserts for the profile that pins 0;
  the query now uses the value the profile pins, otherwise the default.
- `05480_autopr_plan_based_group_by_order_by_top_k`: `adaptive_aggregator_freeze_threshold`
  changes the `AutoParallelReplicasNoStatistics` counter.
- `05627_aggregate_projection_optimizer_stored_query`: a tiny
  `query_plan_max_set_size_for_projection_match` stops the projection from matching,
  which `force_optimize_projection` rejects.
- `05843_in_set_index_shared_sort`: `prefer_optimize_projection` skips the primary key
  pruning the test checks.
- `05075_mutation_partition_pruning_table_in_set`: without
  `optimize_mutations_with_partition_pruning` every mutation covers every partition in
  `system.mutations`.

#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pin does not fix the test: it still fails with the threshold at its default, also
with `adaptive_aggregator_freeze_threshold_bytes` at its default, so another randomized
setting changes the `AutoParallelReplicasNoStatistics` counter. As a changed test it now
runs in the flaky checks, where it fails often enough to stop the jobs early. The cause
is not known yet, so the test is left unpinned.

#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The aggregation of `GROUP BY ... LIMIT` without `ORDER BY` always gets
`observation_rows = 0` (`optimizeGroupByTopK`), and the value is part of the serialized
aggregation step that the statistics of automatic parallel replicas are keyed by. With the
randomized value 0 the earlier `ORDER BY` queries of the test have the same aggregation
step, so the query without `ORDER BY` finds their statistics and does not count
`AutoParallelReplicasNoStatistics`. The results do not change.

Found from the `query_log` dumps of the CI jobs: the value 0 was set in all 16 failing
runs and in none of the 45 passing ones; reproduced locally.

#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread tests/clickhouse-test Resolved
PedroTadim and others added 7 commits November 24, 2026 12:16
The test compares the joins at the default minimum with the same joins at 0, which it sets
for each query. A randomized 0 for the session makes the default queries pack their keys as
well, so the `JoinPackedStringKeys*` counters of those lines change; the results do not.

#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Session: `json_use_optimized_type_conversion` (the optimized and the legacy `JSON` type
conversion), `read_in_order_max_bytes_to_prefetch`, `enable_robin_hood_hash_for_joins`,
`query_plan_use_shuffle_for_order_by_rand`, `output_format_parquet_data_page_row_limit` and
`output_format_arrow_max_record_batch_size_bytes`.

`MergeTree`: `serialize_statistics_bounds_with_column_type` (the `V5` statistics format) and
`adaptive_codec_selection_period`, which takes effect with the already randomized
`enable_adaptive_codec_selection`.

None of them changes query results; every value was checked on master.

#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- `04335_arrow_memory_limit_error_code`: the test needs one ~30 MiB record batch, which
  `output_format_arrow_max_record_batch_size_bytes = 65536` splits, so the read fits the memory limit.
- `05512_parquet_metadata_cache_offset_index`: `output_format_parquet_data_page_row_limit` below the
  page size in rows makes more pages, so the offset indexes outgrow the byte budget of the kept ones
  and fewer offset index hits are counted.
- `05632_json_conversion_changed_path_out_of_range`: the queries without the setting check the
  optimized conversion; `json_use_optimized_type_conversion = 0` gives the documented `INCORRECT_DATA`
  of the parser instead of `CANNOT_PARSE_IPV4`/`CANNOT_PARSE_IPV6`.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=106734&sha=e78491ca2fd239d73527a3cbf699d82fe23d41ff&name_0=PR
#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…w limit in 05628

- `05480_autopr_plan_based_group_by_order_by_top_k`: with `adaptive_aggregator_freeze_threshold = 1` every
  new key goes to the backlogs of the adaptive aggregator, which the top-K boundary does not filter
  (`AggregationTopKRowsSkipped` 8K-16K instead of 65K-262K), so the output bytes that mode 2 records grow
  from about 100 to 376K-566K and mode 1 no longer switches the priced queries to parallel replicas.
  In `Stateless tests (amd_debug, parallel)` the reruns with these settings failed 50 of 54 times;
  with the pin the recorded output bytes are about 100 again. The earlier pin to the default was
  right, that round failed for `group_by_top_k_optimization_observation_rows = 0`.
- `05628_parquet_lazy_materialization_pages_from_headers`: `output_format_parquet_data_page_row_limit = 1000`
  makes pages smaller than 16 KiB, and `locatePagesFromHeaders` gives up on chunks of small pages
  by design, so no pages are located for the 32 KiB file. The results are unchanged.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=106734&sha=e78491ca2fd239d73527a3cbf699d82fe23d41ff&name_0=PR
#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- `03272_json_to_json_cast_4`: with `json_use_optimized_type_conversion = 0` the legacy format+parse
  conversion splits the paths between dynamic paths and shared data as the reference did before
  #107866 updated it; the values are the same.
- `05832_join_runtime_filter_bool_cast_key`: the `datetime_time_zone` query prunes only through a
  `bloom_filter` skip index, which is probed with the exact values of the runtime filter. With
  `join_runtime_filter_exact_values_limit = 1` its 3 build values become a bloom runtime filter and
  no granule is dropped (470 with the default limit).

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=106734&sha=456c6c22fb08ccb2359b1a5d2172289fbf6e0ad2&name_0=PR
#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`join_runtime_bloom_filter_bytes = 1024` also bounds the exact set of a local runtime filter, which
counts the bytes of its hash table buffer, so a set of one `Decimal` key is already full and becomes
a bloom filter, which gives no key range for the primary key analysis: `05832_decimal_precision`
drops no granules (509 with the default). Pin it with `join_runtime_filter_exact_values_limit` at
the top of the test instead of only in the `datetime_time_zone` query, since every pruning query
needs the exact values.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=106734&sha=ea45b7ce503e50372ad87206332c7bc799e66723&name_0=PR
#106734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
SET group_by_top_k_optimization_observation_rows = 65536;
-- A freeze threshold of 1 sends every new key to the backlogs of the adaptive aggregator, which the top-K boundary does not
-- filter, so the aggregation output the statistics record grows and the priced queries are not switched.
SET adaptive_aggregator_freeze_threshold = 16384;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Major] Pin the byte freeze bound alongside the key bound

The runner also draws adaptive_aggregator_freeze_threshold_bytes = 1, which still freezes the adaptive producers after their first block despite this key-count pin (Aggregator::adaptiveFreezeBoundReached checks either bound). With the allowed adaptive_aggregator_disable_thaw = 1 draw, subsequent blocks stay in executeFrozen, staging keys instead of applying the group-key Top-K heap. Those groups inflate the aggregation output recorded for AutoPR pricing, so the cost model can decline the queries whose assertions require AutoParallelReplicasApplied = 1—the same failure this new pin is intended to prevent.

Please also pin adaptive_aggregator_freeze_threshold_bytes = 0 (or the intended large byte bound) here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-testing Test content only (no production code). pr-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants