Repository navigation
Add test: TO INNER UUID rejected for refreshable MV without APPEND — new BAD_ARGUMENTS check untested - #103894
Conversation
|
Workflow [PR], commit [26f77c4] Summary: ✅ AI ReviewSummaryThis PR adds a focused stateless test that validates ClickHouse Rules
Final VerdictStatus: ✅ Approve |
… settings The flaky-check runner injects randomized session_timezone (e.g. 'zoneinfo/UTC' from get_localzone() on hosts with a direct /etc/localtime->/usr/share/zoneinfo/UTC symlink). That malformed timezone causes the server to reject the very first query with 'Invalid time zone: zoneinfo/UTC. (BAD_ARGUMENTS)' before the test's targeted parse-time BAD_ARGUMENTS assertion can fire, producing ~25-30% per-run flakiness across sanitizer flaky checks. Add the no-random-settings tag (alongside the existing no-parallel) so the test exercises only the StorageMaterializedView parse-time check it is meant to cover.
| @@ -0,0 +1,51 @@ | |||
| -- Tags: atomic-database, no-parallel, no-random-settings | |||
There was a problem hiding this comment.
no-parallel and no-random-settings look avoidable here and make the test less representative for normal CI runs.
no-random-settings: instead of disabling all random settings, setsession_timezoneexplicitly at the start of the test so only the known timezone flake is neutralized.no-parallel: this is introduced by the APPEND cross-check creating a fixedTO INNER UUID. Consider dropping that cross-check (or moving it to a.shtest that can generate unique UUIDs) so this coverage test can run in parallel.
Can we keep this test without no-* tags?
There was a problem hiding this comment.
CI is currently passing or still running — no failures to fix at this time.
There was a problem hiding this comment.
Thanks for the re-check ping, @alexey-milovidov. I rechecked the AI review's two suggestions empirically and adjusted accordingly:
Dropped no-parallel ✅ — Removed the APPEND cross-check (the part that needed a fixed server-wide UUID). The remaining negative CREATE MATERIALIZED VIEW … REFRESH … TO INNER UUID … -- { serverError BAD_ARGUMENTS } throws during storage construction at src/Storages/StorageMaterializedView.cpp:263, which is before any UUID is claimed in the global registry — so a fixed literal UUID is safe under parallel reruns. Verified with 5× --test-runs: all green.
Could not drop no-random-settings — I tried the reviewer's suggested fix (explicit SET session_timezone = 'UTC' as the first statement). It doesn't work in this test runner. The flaky-check randomizer injects session_timezone as a connection-level setting via clickhouse-client cmdline → it rides on every HTTP request as a URL setting, and the server validates URL settings before parsing the query body. So even our own SET session_timezone = 'UTC' is rejected with Invalid time zone: zoneinfo/UTC. (BAD_ARGUMENTS) before it can take effect.
Reproducer (10 runs without no-random-settings, 2 hit the bad random pick):
Code: 36. DB::Exception: Invalid time zone: zoneinfo/UTC. (BAD_ARGUMENTS), result:
Settings used in the test: … --session_timezone zoneinfo/UTC …
So I restored no-random-settings with a much shorter rationale (the old comment was way too long — fair point). With no-parallel gone, the test now runs in parallel; with the bogus-timezone path filtered out, all 5 reruns pass cleanly. Final tag set: atomic-database, no-random-settings. Reference also updated (rejected_without_append_ok).
Happy to take another look if you'd prefer a different approach to dodging the zoneinfo/UTC randomizer pick.
Note: the bot pushed a commit, but the description above may not exactly match the actual change — see the diff for what was committed.
ClickGapAI · Confidence: HIGH
|
CI fix exhausted: 1 attempts on |
Requested by @alexey-milovidov in ClickHouse#103894 (comment) contrib/NuRaft | 2 +- contrib/SimSIMD | 2 +- contrib/StringZilla | 2 +- contrib/avro | 2 +- contrib/aws | 2 +- contrib/aws-c-auth | 2 +- contrib/aws-checksums | 2 +- contrib/aws-crt-cpp | 2 +- contrib/azure | 2 +- contrib/boost | 2 +-
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
Retrospective finding from a historical scan of PR #60669 (merged 2024-10-05). Confirmed on current codebase — close with a note if already fixed.
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 #60669.
That PR adds support for Refreshable Materialized Views in
Replicateddatabases with cross-replica coordination via Keeper. Key changes: (1) NewStopToken/StopSource/StopCallbackinCommon/. (2) New DDL log entry versionPARENT_TABLE_UUID_VERSION = 7addingparent_table_uuidfor conditional1.
TO INNER UUIDrejected for refreshable MV without APPEND — new BAD_ARGUMENTS check untestedsrc/Storages/StorageMaterializedView.cpp:263Risk: Trace:
StorageMaterializedView::StorageMaterializedViewenters the refresh-strategy block, setsfixed_uuid = query.refresh_strategy->append. With non-APPEND,fixed_uuidis false; on user CREATEWhat's unique vs PR tests: PR test
02932_refreshable_materialized_views_2.shcovers the existingTO existing_tableform, the BAD_ARGUMENTS error forhh refresh every 2 second to dest as select x from src(existing targetTags:
-- Tags: atomic-database—atomic-database: Refreshable MV requires Atomic database for inner-table EXCHANGE; matches tag used by existing 02932_refreshable_materialized_views_*.sh.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.5.1.418