Repository navigation
Conversation
…se#71288) Issue ClickHouse#71288 reported `CANNOT_PARSE_DATETIME: while converting '0' to DateTime64(3)` when running SELECT count() FROM remote('127.0.0{1,2}', currentDatabase(), t) WHERE r IN (toDateTime64('1970-01-01 00:00:00.000', 3)) against a Memory()-engine table whose `DateTime64(3)` column held the epoch-zero value, on the analyzer path. The fix landed around 24.9 (verified by @den-crane on https://fiddle.clickhouse.com/262f75d2-fcd2-4207-8894-712af5ea7bce and confirmed on current master); this commit adds the missing stateless regression test so the behavior cannot silently regress again. `session_timezone = 'UTC'` is pinned on each query so the DateTime literal interpretation is stable under CI's randomized session timezone — the bug being guarded against is independent of timezone. Closes ClickHouse#71288.
|
Pre-PR validation gate (TASK.md Phase 4 step 9):
Session id: |
|
cc @den-crane — this is the regression test you asked for in issue #71288. The test reproduces your fiddle on both analyzer paths; |
| CREATE TABLE test_71288 (r DateTime64(3)) ENGINE = Memory() AS SELECT 0; | ||
|
|
||
| SELECT count() | ||
| FROM remote('127.0.0{1,2}', currentDatabase(), test_71288) |
There was a problem hiding this comment.
Looks like a missing comma.
There was a problem hiding this comment.
Thanks @alexey-milovidov — I read this as "missing dot" since the comma count is correct for remote(addresses, db, table).
'127.0.0{1,2}' expands to hosts 127.0.01 and 127.0.02. ClickHouse's IP parser happens to resolve both to 127.0.0.1, so the test passed by accident — but the canonical form used in 20 other tests/queries/0_stateless files is '127.0.0.{1,2}' with the explicit dot before the brace.
Pushed 5c7df7cb24a to switch to the canonical form. Verified locally with --test-runs 50: 50/50 pass. Let me know if you meant something else and I'll address it.
|
Workflow [PR], commit [c7e52c6] Summary: ✅ AI ReviewSummaryThis PR adds a stateless regression test for issue Final Verdict✅ Approve. No new findings on the current head. |
Address @alexey-milovidov inline review on PR ClickHouse#104543: ClickHouse#104543 (comment) The address literal '127.0.0{1,2}' (no dot before the brace expansion) expands to hosts 127.0.01 and 127.0.02. ClickHouse's lenient IP parsing still resolves both to 127.0.0.1, so the test passed by accident — but the form is non-idiomatic: every other test in tests/queries/0_stateless uses '127.0.0.{1,2}' (20 files) with the explicit dot before the brace. This commit switches to the canonical form. Verified locally with --test-runs 50: 50/50 pass on master HEAD.
|
@groeneai can you check the failing test? Maybe a separate PR to fix it is needed |
|
@PedroTadim — investigated; the failing test is unrelated to this PR and looks like a transient TSan+S3 timeout. Failing check
Failure modeCI's own auto-rerun already passedThe praktika randomized-settings diagnosis ran in the same job and reports: CIDB cross-PR data (last 30 days)
The April 27 cluster on #76867 hit 7 different checks within the same minute — a single CI-environment hiccup, not a per-test issue. Today's hit is identical pattern: 300s timeout on Our 04218 test (the one this PR adds)Passes everywhere — 50/50 on each sanitizer flaky check (amd_asan_ubsan, amd_debug, amd_tsan, amd_msan), 10/10 on parallel-batch runs, 0 failures observed. RecommendationRe-run the failing check. Our regression test is stable and unrelated to |
|
@groeneai can you create a separate PR to fix that test? |
|
@PedroTadim — separate PR opened: #104697 ("Stabilize Short version: reproduced locally on TSan+S3 — the Full Pre-PR validation gate is in the comment on #104697. This PR (#104543) is otherwise AI-Review APPROVED — waiting on your acknowledgement on the missing-dot fix (5c7df7c) or on the CI re-run, whichever is more convenient. |
The test creates a `metric_log`-shaped table (1200+ columns) on `s3_no_cache` storage and runs `OPTIMIZE TABLE ... FINAL` twice. Under TSan (and any other slow sanitizer) the merge is intrinsically slow: a local TSan+S3 reproduction takes ~77-90s per `OPTIMIZE FINAL`. The default client `receive_timeout` is 300s, which is fine on master but can be exceeded under CI load (parallel tests + ThreadFuzzer + S3 throughput variability), producing a transient `TIMEOUT_EXCEEDED` (code 159) of the form: Timeout exceeded while receiving data from server. Waited for 300 seconds, timeout is 300 seconds. (query: optimize table metric_log final;) The merge itself is healthy and continues on the server; only the client gives up while waiting. CIDB shows this exact signature on `Stateless tests (amd_tsan, s3 storage, sequential)` on multiple PRs. The fix follows the canonical pattern from 03015_optimize_final_rmt.sh and attaches `SETTINGS receive_timeout = 900` to each of the two `OPTIMIZE FINAL` statements. This is targeted and preserves what the test verifies — peak memory of a wide-column merge controlled by `max_merge_delayed_streams_for_parallel_write`. Nothing else is changed: same 1200 columns, same `s3_no_cache` storage policy, same merge settings. Demonstrated in both directions on a local TSan+S3 reproduction: - `--receive_timeout=30` reproduces the exact CIDB error. - `SETTINGS receive_timeout = 900` makes the same OPTIMIZE complete in ~77s. - Full test passes 3/3 end-to-end on TSan+S3 locally with the fix. cc @PedroTadim — follow-up to ClickHouse#104543 review feedback. CI report (example failure): https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104543&sha=5c7df7cb24af2897820e687eab7d2b49d486b40d&name_0=PR&name_1=Stateless%20tests%20%28amd_tsan%2C%20s3%20storage%2C%20sequential%2C%202%2F2%29
|
Dear @yariks5s, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
|
@groeneai please update your branch with master so the CI can be triggered again with fixed tests |
The branch was created when 04218 was the next free number; master has since reached 04416 and accumulated several other 04218_* tests. Use the next available number so the test name is unambiguous. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
@yariks5s — done, branch is updated with
The earlier review point from @alexey-milovidov was addressed in |
…-datetime64-remote-zero
|
@yariks5s — re-synced the branch with current For the record, the only red on the previous run (
The added test |
Add a non-matching row (epoch + 1s) alongside the epoch-zero row so that a silently dropped remote WHERE r IN (...) filter yields count 4 instead of 2, making the test fail if the filter path is lost, not only if the query errors. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Head branch was pushed to by a user without write access
|
Good catch. Fixed in cb8539c. The fixture now inserts a non-matching row ( CREATE TABLE test_71288 (r DateTime64(3)) ENGINE = Memory();
INSERT INTO test_71288 VALUES (0), (1000);Now each shard holds 2 rows but only 1 matches the
Verified locally against a 2-shard remote() over master: filtered count is 2 on both analyzer=0 and analyzer=1, and an unfiltered count over the same two shards is 4. The test now gates the remote filter path, not just the parse error. |
|
Updating the branch to fix the |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 94 line(s), 5 function(s) across 43 file(s) · Details Top files
|
CI finish ledger — c7e52c6CI fully finished on head
No PR-caused failure. Approved by @yariks5s. Ready to merge. Session id: cron:our-pr-ci-monitor:20260706-230000 |
|
Fixing PR for the 01516_drop_table_stress_long flaky failure: #109587 |
729ecb8
Address @alexey-milovidov inline review on PR ClickHouse#104543: ClickHouse#104543 (comment) The address literal '127.0.0{1,2}' (no dot before the brace expansion) expands to hosts 127.0.01 and 127.0.02. ClickHouse's lenient IP parsing still resolves both to 127.0.0.1, so the test passed by accident — but the form is non-idiomatic: every other test in tests/queries/0_stateless uses '127.0.0.{1,2}' (20 files) with the explicit dot before the brace. This commit switches to the canonical form. Verified locally with --test-runs 50: 50/50 pass on master HEAD.
…8-datetime64-remote-zero Add regression test for DateTime64 zero over remote() (issue ClickHouse#71288)
Motivation
Issue #71288
reported
CANNOT_PARSE_DATETIME: while converting '0' to DateTime64(3)when running
against a
Memory()-engine table whoseDateTime64(3)column held theepoch-zero value. The non-analyzer path returned the correct count; the
analyzer path threw
CANNOT_PARSE_DATETIMEwhile shipping the column tothe remote shard.
The bug was fixed around 24.9 — @den-crane verified on a fiddle
and asked us to land the missing regression test and close the issue.
This is probably a duplicate of #66773.
Change
Adds
tests/queries/0_stateless/04218_distributed_remote_datetime64_zero_71288.sqlwhich runs the exact repro on both analyzer paths and asserts both
return
2(one row per shard).session_timezone = 'UTC'is pinned on each query so that CI'srandomized session timezone cannot cause the literal
'1970-01-01 00:00:00.000'to be interpreted in a non-UTC zone — thatmismatches the stored UTC epoch and would make the filter return
0rows, which is unrelated to the bug under test. With the pin in place,
the test was confirmed stable: 50/50 passes locally under
--test-runs 50with full settings randomization.Closes #71288.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.7.1.707(included in26.7and later)