Repository navigation
Add test: Adaptive codec selection firing on the vertical merge algorithm is untested - #112971
Conversation
|
Pre-PR Validation Gate (per ClickGap pipeline): a) Deterministic repro? ✅ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ✅ f) Fix is general, not a narrow patch? ✅ |
|
Workflow [PR], commit [cf3fc5d] Summary: ✅ AI ReviewSummaryThis PR adds a focused stateless regression test for the previously untested Final Verdict✅ No findings. |
The T64/NONE codec check alone stays green under a horizontal fallback (MergeTask.cpp:1053); add a system.part_log MergeParts assertion so the test fails if the merge stops using MergeAlgorithm::Vertical. Requested by @clickhouse-gh[bot] in ClickHouse#112971 (comment)
| -- The merge actually used the vertical algorithm; otherwise `n` is written by the horizontal | ||
| -- call site (MergeTask.cpp:1053) and the vertical writer at MergeTask.cpp:1985 stays untested. |
There was a problem hiding this comment.
Let's not reference exact lines of code in tests. Please remember it for all future PRs
There was a problem hiding this comment.
Understood — no exact code-line references in tests going forward. The current test already carries none: line 20 reads -- call site and the vertical writer stays untested. and the header comment describes the vertical per-column stream in prose only. Thanks for the guidance.
Build profile diff (arm_release)Comparing Binary sizes
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. Object file sizes
|
| Object file | Master | PR | Δ |
|---|---|---|---|
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/ext/transport/chttp2/transport/cht… |
960.56 KiB | removed | -960.56 KiB (-100.00%) |
src/Common/ZooKeeper/CMakeFiles/clickhouse_common_zookeeper_no_log.dir/ZooKeeperImpl.cpp.o |
806.39 KiB | removed | -806.39 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/server/server.cc.o |
612.22 KiB | removed | -612.22 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/load_balancing/rls/rls.cc.o |
611.36 KiB | removed | -611.36 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/client_channel/client_channel_filt… |
548.04 KiB | removed | -548.04 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/client_channel/client_channel.cc.o |
525.46 KiB | removed | -525.46 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/client_channel/retry_interceptor.c… |
518.85 KiB | removed | -518.85 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/lib/channel/promise_based_filter.c… |
482.91 KiB | removed | -482.91 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/load_balancing/grpclb/grpclb.cc.o |
434.97 KiB | removed | -434.97 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/call/client_call.cc.o |
433.89 KiB | removed | -433.89 KiB (-100.00%) |
src/CMakeFiles/dbms.dir/Databases/DatabaseURL.cpp.o |
new | 400.85 KiB | +400.85 KiB |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/call/server_call.cc.o |
391.29 KiB | removed | -391.29 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc++_unsecure.dir/__/grpc/src/cpp/server/server_cc.cc.o |
384.88 KiB | removed | -384.88 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/client_channel/retry_filter_legacy… |
369.55 KiB | removed | -369.55 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/ext/transport/chttp2/transport/wri… |
349.81 KiB | removed | -349.81 KiB (-100.00%) |
contrib/google-cloud-cpp-cmake/CMakeFiles/google_cloud_cpp_grpc_utils.dir/__/google-cloud-cpp/googl… |
346.93 KiB | removed | -346.93 KiB (-100.00%) |
contrib/grpc-cmake/CMakeFiles/grpc_unsecure.dir/__/grpc/src/core/ext/transport/inproc/legacy_inproc… |
345.35 KiB | removed | -345.35 KiB (-100.00%) |
contrib/google-cloud-cpp-cmake/CMakeFiles/google_cloud_cpp_longrunning_operations_protos.dir/google… |
339.33 KiB | removed | -339.33 KiB (-100.00%) |
contrib/google-cloud-cpp-cmake/CMakeFiles/google_cloud_cpp_iam_credentials_v1_iamcredentials_protos… |
334.24 KiB | removed | -334.24 KiB (-100.00%) |
contrib/google-protobuf-cmake/CMakeFiles/_libprotobuf-lite.dir/__/google-protobuf/src/google/protob… |
316.58 KiB | removed | -316.58 KiB (-100.00%) |
Slowest function optimization changes (ThinLTO) ⚠️
Median per-function time ratio to the master baseline is ×1.17 (different machine and build flags); deltas below are relative to that ratio.
| Binary | Function | Master | PR | Δ vs median |
|---|---|---|---|---|
programs/clickhouse-keeper |
DB::SettingsTraits::Accessor::instance()::$_0::operator()() const [clone .llvm.3833315002542633314] |
new | 16.3 s | +16.3 s |
programs/clickhouse-keeper |
DB::SettingsTraits::Accessor::instance()::$_0::operator()() const [clone .llvm.6969868754578406721] |
8.5 s | gone | -10.0 s (-100%) |
programs/clickhouse |
DB::SettingsTraits::Accessor::instance()::$_0::operator()() const [clone .llvm.6969868754578406721] |
8.0 s | gone | -9.4 s (-100%) |
programs/clickhouse |
DB::SettingsTraits::Accessor::instance()::$_0::operator()() const [clone .llvm.3833315002542633314] |
new | 6.1 s | +6.1 s |
programs/clickhouse-keeper |
DB::registerFunctionConversion(DB::FunctionFactory&) |
6.9 s | 13.8 s | +5.8 s (+71%) |
programs/clickhouse-keeper |
_GLOBAL__sub_I_TargetLibraryInfo.cpp |
5.9 s | 11.4 s | +4.6 s (+66%) |
programs/clickhouse |
DB::Parquet::writeColumnChunkBody(DB::Parquet::ColumnChunkWriteState&, DB::Parquet::WriteOptions co… |
5.2 s | 3.1 s | -3.0 s (-49%) |
programs/clickhouse-keeper |
DB::ServerSettingsTraits::Accessor::instance()::$_0::operator()() const [clone .llvm.41530897155626… |
new | 2.5 s | +2.5 s |
programs/clickhouse |
DB::getSettingsChangesHistory()::$_0::operator()() const |
4.3 s | 2.6 s | -2.5 s (-49%) |
programs/clickhouse-keeper |
DB::MergeTreeSettingsTraits::Accessor::instance()::$_0::operator()() const [clone .llvm.12816159879… |
new | 2.4 s | +2.4 s |
programs/clickhouse |
DB::Aggregator::writeToTemporaryFile(DB::AggregatedDataVariants&, unsigned long) const |
3.4 s | 1.7 s | -2.2 s (-56%) |
programs/clickhouse-keeper |
DB::ServerSettingsTraits::Accessor::instance()::$_0::operator()() const [clone .llvm.12822858084705… |
1.8 s | gone | -2.2 s (-100%) |
programs/clickhouse |
DB::attachSystemTablesServer(std::__1::shared_ptr<DB::Context const>, DB::IDatabase&, bool, bool) |
4.3 s | 3.0 s | -2.1 s (-41%) |
programs/clickhouse-keeper |
_ZN2DB18FunctionArrayIndexINS_16CountEqualActionENS_14NameCountEqualEE15executeIntegralIJDutjmDB8_s… |
1.9 s | 4.3 s | +2.1 s (+91%) |
programs/clickhouse |
DB::ServerSettingsTraits::Accessor::instance()::$_0::operator()() const [clone .llvm.12822858084705… |
1.7 s | gone | -2.0 s (-100%) |
Compile time of recompiled translation units
6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline.
Symbol sizes
No symbol data for the master baseline yet (it is collected for release builds only since this check was introduced); the comparison will activate once master catches up.
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.
Adds test coverage for 1 untested code path(s), found during automated review of PR #111834.
That PR The PR adds the experimental
MergeTreesettingallow_experimental_adaptive_codec_selection. When enabled, merges and mutations write each block of a default-codec (CODEC(Default)or noCODEC) column with whichever candidate codec (the table default,NONE, or a type-specialized codec) produ1. Adaptive codec selection firing on the vertical merge algorithm is untested
src/Storages/MergeTree/MergeTask.cpp:1985Risk:
MergeTask.cpp:1985 passestry_adaptive_codec = !global_ctx->is_explicit_recompressionto the per-column vertical-merge writer, a call site distinct from the horizontal writer (MergeTask.cpp:1052) and the mutation writers. The only test that forces the vertical algorithm (04403t_v) usesRECOMPRESS CODEC(NONE), sois_explicit_recompression=trueand adaptivity is off there; every other adaptive test merges horizontally (<11 columns). Risk: if the vertical call site's …What's unique vs PR tests: The PR's tests fire adaptive selection only through the horizontal writer (04305 etc., all <11 columns) and through the column-only mutation writer (04305 ALTER UPDATE). The only test forcing the vertical algorithm (04403
t_v) usesRECOMPRESS CODEC(NONE), which disables adaptivity. No PR test fires adaptive selection through the vertical merge writer; this test does.Tags:
-- Tags: no-random-merge-tree-settings—no-random-merge-tree-settings: Randomized merge-tree settings can flip enable_vertical_merge_algorithm off or add block-number/offset columns to mergeTreeCodecBlockCounts output; the test must pin the vertical algorithm to exercise the intended call site.Try it on ClickHouse Fiddle
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes
Version info
26.8.1.655(included in26.8and later)