Skip to content

Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp - #124652

Merged
alexbakharew merged 13 commits into
ClickHouse:masterfrom
clickgapai:covgap/05339_s3queue_ordered_migrate_to_buckets
Oct 20, 2026
Merged

alexbakharew merged 13 commits into
ClickHouse:masterfrom
clickgapai:covgap/05339_s3queue_ordered_migrate_to_buckets

Conversation

@clickgapai

@clickgapai clickgapai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Test-only PR from the coverage agent. Review: is the gap real, is the test right.

Adds tests/queries/0_stateless/05339_s3queue_ordered_migrate_to_buckets, which executes code that no stateless test on master executes: migrateToBuckets in src/Storages/ObjectStorageQueue/ObjectStorageQueueOrderedFileMetadata.cpp, lines 982-1098 (source at 6903c3f2b940). The function had 64 executable lines with 0 hits in the 4 LLVM coverage baselines of master (6903c3f, b5446bf, 6b5ed92, 9303f58).

Why this test is needed: This test is needed because migrateToBuckets is a SQL-reachable candidate that changes Keeper metadata layout, and its uncovered path can silently break ordered object storage queue bucket migration under concurrency.
What the test asserts: This test asserts that a SQL-visible bucket migration preserves the processed-node state and handles concurrent migration outcomes without corrupting the metadata layout.

Measured on the CI coverage build of 6903c3f2b940. A line counts as uncovered only when it has 0 hits in all 4 baselines.

Check Result
Plain run on the release binary OK in 0.44 s on the plain binary
Coverage effect 49/64 target lines hit; expected missed []; new lines in file 76
Reruns, random and pinned settings {'reruns': {'random': {'rc': 0, 'runs_seen': 20, 'ok': 20, 'fail': 0, 'slowest_s': 0.49, 'wall_s': 67.24}, 'pinned': {'rc': 0, 'runs_seen': 20, 'ok': 20, 'fail'
Style check style check ok in 20 s
Duplicate statements in tests/queries/0_stateless 24 statements, no duplicate

The test was written by an AI agent (a Nerve worker on Claude) from a task of a deterministic census, verified by the gates above, and released under content hash 4b70b8a0337c. It was renumbered from 05331_s3queue_ordered_migrate_to_buckets at publication. The PR is a draft until a person has reviewed it. Replies to review comments come from the agent's owner, not from the agent.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...


Workflow [PR]
Sync PR [sync-upstream/pr/124652]

Version info

  • Merged into: 26.11.1.297-master (included in 26.11 and later)

…data.cpp`

Test `05339_s3queue_ordered_migrate_to_buckets` for `migrateToBuckets` in `src/Storages/ObjectStorageQueue/ObjectStorageQueueOrderedFileMetadata.cpp`; written by the coverage agent, verified against the master coverage baselines, release hash 4b70b8a0337c.
@clickhouse-gh clickhouse-gh Bot added the comp-testing Test content only (no production code). label Oct 8, 2026
@alexbakharew alexbakharew added ci-force-all Do not skip any jobs when running can be tested Allows running workflows for external contributors labels Oct 8, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [d50f39b]

Summary: ✅


AI Review

Summary

Adds a stateless test for ordered S3Queue bucket migration: the opt-in requirement, preservation of the processed pointer in both new buckets, rejection of subsequent migration, and rollback when Keeper rejects removal of the old node. The current diff addresses the earlier review findings. No new actionable findings.

Missing context / blind spots
  • ⚠️ CI for d50f39b9ba416acd933d413e39145ccedaf1b05c is still running, and no current-head execution result for this test was available. No local ClickHouse binary was available for a rerun. A successful stateless run with normal cleanup enabled would close this validation gap.
Final Verdict

Status: ✅ Approve from code review; current-head CI validation remains pending.

LLVM Coverage Report

Measured on commit d50f39b.

Metric Baseline Current Δ
Lines 88.60% 88.60% +0.00%
Functions 92.10% 92.20% +0.10%
Branches 80.20% 80.20% +0.00%

Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage).

Newly covered: +276 lines in 46 files (-149 lines lost coverage) · Details

Full report

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Oct 8, 2026
Repair round of the coverage agent for PR ClickHouse#124652; verified again against the master coverage baselines, release hash 42080a4b6183.
Repair round of the coverage agent for PR ClickHouse#124652; verified again against the master coverage baselines, release hash 9490efd61306.
@clickhouse-gh

clickhouse-gh Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing dc9047b0a with master 56e72cfad (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

6 translation units recompiled, 5 s compile time in total, 6 of them have a recent master baseline.

Job report

Repair round of the coverage agent for PR ClickHouse#124652; verified again against the master coverage baselines, release hash 9b587c1a4a6f.
Repair round of the coverage agent for PR ClickHouse#124652; verified again against the master coverage baselines, release hash 023d5b010576.
Red jobs with failures that are not from this test: tests ['05243_query_condition_cache_top_k_parquet'], jobs []. CI attempt 1 of 5.

Same content as c208e18, pushed by the coverage agent so that CI runs the red jobs again against the current master.
@clickgapai clickgapai changed the title Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 13, 2026
@clickgapai clickgapai changed the title [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 13, 2026
@alexbakharew alexbakharew added ci-llvm-coverage and removed ci-force-all Do not skip any jobs when running labels Oct 14, 2026
Red jobs with failures that are not from this test: tests ['04907_url_function_no_retry_after_cancel', '04952_projection_argumentless_function_json', '05029_url_function_schema_inference_hard_timeout_during_backoff', '05210_lightweight_update_materialized_cte_in_ignore'], jobs ['LLVM Coverage']. CI attempt 2 of 5.

Same content as dc9047b, pushed by the coverage agent so that CI runs the red jobs again against the current master.
Red jobs with failures that are not from this test: tests [], jobs ['LLVM Coverage']. CI attempt 3 of 5.

Same content as c9d92cd, pushed by the coverage agent so that CI runs the red jobs again against the current master.
Red jobs with failures that are not from this test: tests [], jobs ['LLVM Coverage']. CI attempt 4 of 5.

Same content as 80623db, pushed by the coverage agent so that CI runs the red jobs again against the current master.
@clickgapai clickgapai changed the title Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 15, 2026
Rerun CI after the fix of the LLVM Coverage baseline lookup (ClickHouse PR 125987): the previous runs failed only in jobs or tests that are not from this test. Manual retrigger by the owner, not a CI attempt of the agent.

Same content as d5970a5, pushed by the coverage agent so that CI runs the red jobs again against the current master.
@clickgapai clickgapai changed the title [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 15, 2026
@clickgapai
clickgapai marked this pull request as ready for review October 15, 2026 14:45
@clickgapai clickgapai changed the title Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 15, 2026
@clickgapai clickgapai changed the title [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 16, 2026
@clickgapai clickgapai changed the title Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 16, 2026
@clickgapai clickgapai changed the title [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 18, 2026
@clickgapai clickgapai changed the title Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 18, 2026
@clickgapai clickgapai changed the title [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 19, 2026
@clickgapai clickgapai changed the title Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 19, 2026
Repair round of the coverage agent for PR ClickHouse#124652; verified again against the master coverage baselines, release hash 75c0c3cb97e8.
@clickgapai clickgapai changed the title [needs human] Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Add test for migrateToBuckets in ObjectStorageQueueOrderedFileMetadata.cpp Oct 19, 2026
Repair round of the coverage agent for PR ClickHouse#124652; verified again against the master coverage baselines, release hash 1b574cbf6697.
Repair round of the coverage agent for PR ClickHouse#124652; verified again against the master coverage baselines, release hash 4881ea14b3e0.
@alexbakharew
alexbakharew added this pull request to the merge queue Oct 20, 2026
Merged via the queue into ClickHouse:master with commit 2c73a10 Oct 20, 2026
178 checks passed
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 20, 2026
@clickhouse-gh clickhouse-gh Bot added comp-s3queue S3Queue/AzureQueue engines (queue-based ingestion from object storage). and removed comp-testing Test content only (no production code). labels Nov 22, 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 ci-llvm-coverage comp-s3queue S3Queue/AzureQueue engines (queue-based ingestion from object storage). pr-not-for-changelog This PR should not be mentioned in the changelog 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.

3 participants