Skip to content

Mark 03809_time64_not_monotonic as long test - #103718

Merged
yariks5s merged 3 commits into
ClickHouse:masterfrom
groeneai:fix/03809-time64-tag-long
May 14, 2026
Merged

yariks5s merged 3 commits into
ClickHouse:masterfrom
groeneai:fix/03809-time64-tag-long

Conversation

@groeneai

@groeneai groeneai commented Apr 29, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the long tag to tests/queries/0_stateless/03809_time64_not_monotonic.sql so the test opts into the long-test budget and stops being clipped by the 600s timeout on the slowest CI lane (amd_msan, WasmEdge, ~8x slower than amd_tsan).

Follow-up to @alexey-milovidov directive on #102498 (comment) ("do a stabilization PR, option 2 with tagging the test as long").

Triage data (90 days): 195,745 runs, 10 timeouts (99.995% pass rate), p99 = 404s, max passing = 563s — pure transient timeout, no test bug. Precedents for naming/tagging slow regression tests as long: 01049_join_low_card_bug_long, 01516_drop_table_stress_long, 01443_merge_truncate_long.

One-line change to the .sql file. No test logic touched, no .reference change.

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):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.5.1.640

Adds the `long` tag to opt this test into the long-test budget,
bypassing the 600s timeout that occasionally hits on the slowest CI
lane (`amd_msan, WasmEdge`, ~8x slower than `amd_tsan`).

Per @alexey-milovidov directive on PR ClickHouse#102498:
ClickHouse#102498 (comment)

Triage data: 195,745 runs over 90 days, 10 timeouts (99.995% pass rate),
p99 = 404s, max passing = 563s. Pure transient timeout on the slow
lane — `long` tag is the right fix per existing precedents
(`01049_join_low_card_bug_long`, `01516_drop_table_stress_long`,
`01443_merge_truncate_long`).

No test logic changed.
@groeneai

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate (per TASK.md Phase 4 step 9)

# Question Answer
a Deterministic repro? N/A — transient timeout, not a deterministic bug. The fix is a CI metadata change (opt the test into the long-test budget), not a code fix.
b Root cause explained? Yes. The test runs ~p99=404s, max passing=563s on the slowest lane (amd_msan, WasmEdge is ~8x slower than amd_tsan). With a 600s timeout there is too little headroom, so a small fraction of runs (~0.005%) hit the timeout. The long tag re-buckets it into the 1200–1800s budget.
c Fix matches root cause? Yes. The long tag is the established mechanism for tests whose runtime is genuinely long under the slowest sanitizer lanes; precedents include 01049_join_low_card_bug_long, 01516_drop_table_stress_long, 01443_merge_truncate_long. No assertion bounds widened, no setting tags added, no data sizes reduced.
d Test intent preserved? Yes. Zero changes to test logic, queries, or expected output. Only metadata (the Tags: line). The regression coverage of issue #95667 (non-monotonic Time64 conversion in MergeTreeSetIndex) is fully retained.
e Demonstrated in both directions? N/A for the transient-timeout case. Equivalent precedent: tests that previously timed out on the slow lanes have stopped timing out after gaining the long tag (e.g. 01443_merge_truncate_long).
f Fix is general, not a narrow patch? N/A — not a code fix; it's a CI tag. Scope is intentionally narrow: one test file, one line.

Session: cron:clickhouse-ci-task-worker:20260429-134500

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @alexey-milovidov — could you review this? It's the stabilization PR you asked for on #102498: tags 03809_time64_not_monotonic as long so the test gets the long-test budget on the slowest CI lane (amd_msan, WasmEdge, ~8x slower than amd_tsan). One-line metadata change, no test logic touched.

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Apr 29, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [4b359e9]

Summary: ✅


AI Review

Summary

This PR is intended to mark 03809_time64_not_monotonic as a long test to avoid timeout clipping, but the current head also changes the regression workload shape (100000 contiguous values to 10000 sparse values) and adjusts predicate constants. Without proof that this modified dataset still reproduces the original pre-fix failure mode, the regression contract is weaker than before.

Findings

⚠️ Majors

  • [tests/queries/0_stateless/03809_time64_not_monotonic.sql:12] The test is no longer a pure tagging change: data generation and probe constants changed (:12 and :19). That can weaken MergeTreeSetIndex regression coverage because reproducer sensitivity is data-shape dependent.
    Suggested fix: keep this PR scoped to -- Tags: long only, or provide explicit evidence that the new dataset still reproduces the original failure on a pre-fix build.
Tests
  • ⚠️ Add focused proof for the changed reproducer shape: show that the new INSERT/NOT IN variant fails on a pre-fix revision and passes on current master.
Final Verdict

Status: ⚠️ Request changes
Minimum required actions:

  1. Revert the workload-shape changes and keep only the long tag, or
  2. Keep the workload change but add reproducer evidence and update the PR description to reflect that test logic changed.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Apr 29, 2026
@yariks5s yariks5s self-assigned this May 13, 2026
@yariks5s
yariks5s enabled auto-merge May 13, 2026 16:03
SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0;
SET max_block_size = 1000000;
INSERT INTO mt_test (x) SELECT number AS x FROM system.numbers LIMIT 100000;
INSERT INTO mt_test (x) SELECT number * 10 FROM system.numbers LIMIT 10000;

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.

This change is beyond adding the long tag: it alters the regression workload from 100000 contiguous keys to 10000 sparse keys (and the predicate constants were adjusted accordingly). That can weaken the original MergeTreeSetIndex reproducer.

Please either keep this PR scoped to the long tag only, or add evidence that this exact data shape still reproduces the pre-fix failure in 03809_time64_not_monotonic.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch — to be transparent on provenance: my original commit 815fff6 (the PR's first commit) only added -- Tags: long, which was alexey-milovidov's option-2 directive on #102498. The workload changes the bot is flagging come from commit 4b359e9 ("Update 03809_time64_not_monotonic.sql") authored by @yariks5s after their approval.

@yariks5s — could you confirm whether the workload reduction (100k contiguous → 10k sparse keys, predicate 12345 → 12340) is intentional? The bot's concern that this weakens the original MergeTreeSetIndex reproducer is legitimate: with 10k rows the test produces ~1–2 granules vs ~12 for 100k, which materially shrinks the binary-search code path the regression test was designed to exercise.

Happy to:

  • revert 4b359e9 to keep this PR scoped to just the long tag (matches the original directive + bot's preferred resolution), or
  • keep your workload change if you've verified it still reproduces the pre-fix "Invalid binary search result in MergeTreeSetIndex" failure on PR Improvements for the monotonicity detection of Time[64] #95667 reverted locally.

Deferring to you since you have merge rights. There's some urgency — 5 unrelated PRs hit the 03809 timeout today, latest at #96130.

Session: cron:clickhouse-ci-task-worker:20260513-234500

@yariks5s
yariks5s added this pull request to the merge queue May 14, 2026
Merged via the queue into ClickHouse:master with commit c2f4d72 May 14, 2026
167 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants