Repository navigation
input_format_protobuf_oneof_presence does not require exact match of tags to allow schema changes - #109174
Conversation
|
Hello @Avogar, could you enable testing for this, please. |
|
Hello @Avogar, could you look into this please? |
|
Workflow [PR], commit [ec18511] Summary: ❌
AI ReviewSummaryThis PR relaxes Final VerdictStatus: ✅ Approve |
Avogar
left a comment
There was a problem hiding this comment.
Review bot comments seem valid, let's fix them and it can be merged
|
I found a design flaw in how we deal with empty messages. Working on it, will be finished by EOD 24 Jun |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 78/85 (91.76%) · Uncovered code |
|
Hello @Avogar , is it possible to wake up review bot and go further ? |
7644a0d
04411_memory_profiler_sample_probability_sql_settings runs a query with memory_profiler_sample_probability = 1, then SYSTEM FLUSH LOGS trace_log, then asserts a MemorySample row is visible. SystemLogQueue::waitFlush uses a hardcoded timeout_seconds = 180 (src/Common/SystemLogBase.cpp:191) and waits for getLastLogIndex(), a server-global queue position, so the flush drains the trace rows of every concurrently running parallel test rather than only this test's. Under LLVM source-based coverage instrumentation the server is slow enough that this crosses 180 s, waitFlush throws at :213 with Code: 159. Timeout exceeded (180 s) while flushing system log 'DB::SystemLogQueue<DB::TraceLogElement>'. (TIMEOUT_EXCEEDED) and the following SELECT count() > 0 then reads 0, so the coverage lane reports a false negative rather than only contaminating stderr. Over 30 days of coverage-lane runs that PASSED, this test has p50 9.6 s and p95 183.6 s (max 202.3 s) against p50 5.1 s / p95 11.1 s in every other lane, and 2307 of 37648 coverage runs already exceed 180 s. Two crossed it on the flush: Stateless tests (amd_llvm_coverage, 3/3) on 2026-08-20 (PR ClickHouse#115623) and (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) on 2026-07-23 (PR ClickHouse#109174). Report for the 2026-08-20 failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115623&sha=9b52646c82721f24b7dfb1ddc58d949beef5a7d0&name_0=PR&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%203%2F3%29 no-llvm-coverage is the established remedy for this mechanism: 36 stateless tests carry it, and commit 36decd6 ("Mark tests that timed out under LLVM coverage as no-llvm-coverage") applied it to five tests including this test's direct sibling 02818_memory_profiler_sample_min_max_allocation_size, whose shape is identical. 04411 was created two months after that commit, which is why it was missed. Coverage is relocated, not lost: the inverse filter at tests/clickhouse-test:2967-2971 makes Stateless tests (amd_binary_excluded_from_llvm) run exactly the tagged complement, and the two flags are mutually exclusive by construction (ci/jobs/functional_tests.py:608-612). Over 14 days in that job the tagged siblings 02818 and 01473_event_time_microseconds are OK 4367 and 4365 times while 04411 is SKIPPED 4367 times. The same intervention on 01473 (ClickHouse#103219, merged 2026-08-04) took its coverage-lane failures from 5 to 0. Raising or parameterizing the 180 s constant was rejected: it is a server-wide change for one test, the constant is already a deliberate concession to parallel-test load, and because the drain is global a larger value only moves the threshold. Validated with the real runner. With the tag, --llvm-coverage skips and --excluded-from-llvm runs; with the tag removed both verdicts invert, which is the liveness proof that the arms measure the tag. Without any coverage flag the test still runs, 10/10. Related: ClickHouse#114204
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Processing protobuf messages with
input_format_protobuf_oneof_presencewe do not require exact match of tags to allow schema changes.We are moving from validating the oneof presence Enum against all oneof tags declared in the .proto schema, which is too strict, to validating it against the oneof tags that actually have matching columns in the target table.
Version info
26.8.1.352(included in26.8and later)