Skip to content

Sync private - #107335

Closed
scanhex12 wants to merge 6 commits into
ClickHouse:masterfrom
scanhex12:sync_private_iceberg
Closed

scanhex12 wants to merge 6 commits into
ClickHouse:masterfrom
scanhex12:sync_private_iceberg

Conversation

@scanhex12

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

@clickhouse-gh

clickhouse-gh Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b2ede21]

Summary: ❌

job_name test_name status info comment
Stress test (amd_tsan) FAIL
Logical error: 'std::exception. Code: 1001, type: std::__1::future_error, e.what() = The associated promise has been destructed prior to the associated state becoming ready. (version 26.6.1.1), Stack trace: (STID: 2508-34fb) FAIL cidb
Stress test (arm_msan) ERROR

AI Review

Summary

This PR syncs a small Iceberg private-integration surface into OSS: it hides the OSS compaction implementation under CLICKHOUSE_CLOUD, adds IcebergMetadata::createWithDeserialization, exposes persistent components, and adds an optional prepared_iterator path. I did not find a new line-level correctness issue beyond the already-open missing-coverage thread, but the new deserialization contract is still under-proven.

Missing context / blind spots
  • ⚠️ The PR title/body do not explain the private-sync contract or caller for IcebergMetadata::createWithDeserialization; a short description of what serializes these fields and when prepared_iterator is expected to be populated would close this gap.
  • ⚠️ The OSS diff has no caller for IcebergMetadata::createWithDeserialization or assignment to prepared_iterator, so I could only validate the local factory mechanics, not the end-to-end distributed/private path.
Tests
  • ⚠️ src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp:1371 The new deserialization entry point reads format_version, table_location, and metadata_compression_method from the wire, then mixes them with freshly initialized persistent components. The already-open inline thread is still valid: please add a focused end-to-end test proving a deserialized Iceberg metadata object can read a table with non-default schema parsing settings such as allow_experimental_geo_types_in_iceberg and compressed metadata.
Final Verdict

Status: ⚠️ Request changes

Minimum required action: add the focused deserialization coverage above or explain why this path is covered in a private test suite that will run for this PR.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 12, 2026
@SmitaRKulkarni SmitaRKulkarni self-assigned this Jun 15, 2026

@SmitaRKulkarni SmitaRKulkarni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rest all LGTM


DataLakeMetadataPtr IcebergMetadata::createWithDeserialization(
const ObjectStoragePtr & object_storage,
const StorageObjectStorageConfigurationWeakPtr & configuration,

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 new deserialization entry point needs focused coverage because it does not follow the normal IcebergMetadata::create contract exactly: it reads format_version, table_location, and metadata_compression_method from the wire, then mixes those values with freshly initialized persistent components from the current storage configuration. Please add the smallest test that exercises this path end-to-end and proves the deserialized metadata can still read an Iceberg table with non-default schema parsing settings such as allow_experimental_geo_types_in_iceberg and compressed metadata.

@clickhouse-gh

clickhouse-gh Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.30% 85.10% -0.20%
Functions 92.30% 92.30% +0.00%
Branches 77.40% 77.30% -0.10%

Changed lines: Changed C/C++ lines covered by tests: 9/45 (20.00%) | Lost baseline coverage: none · Uncovered code

Full report · Diff report

@clickhouse-gh

clickhouse-gh Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 38 queries analysed

This PR changes only Iceberg data-lake metadata handling (schema deserialization, compaction guards, and a prepared-iterator path). The ClickBench and TPCH benchmarks run against standard MergeTree tables and never execute Iceberg code, so none of the flagged deltas — regressions on clickbench Q18 and tpch Q8, or improvements on clickbench Q22/Q23 and tpch Q7/Q20 — can plausibly be caused by this change. All seven have been downgraded to not-sure: they are run-to-run variance, not a real effect of the PR. No action needed on performance grounds.

clickbench

⚠️ 4 inconclusive

Flagged queries (4 of 43)
Query Verdict Baseline med (ms) PR med (ms) Change q-value Hint
⚠️ 18 not_sure 1403 1550 +10.5% <0.0001 PR only touches Iceberg data-lake metadata; ClickBench MergeTree path untouched, so this +10% is run-to-run variance
⚠️ 22 not_sure 334 264 -21.0% <0.0001 Iceberg-only change cannot speed up this ClickBench SELECT; -21% is noise (source measurements were very noisy)
⚠️ 23 not_sure 297 206 -30.6% <0.0001 PR is Iceberg metadata plumbing only; this query never runs that code, so the -31% delta is unrelated to the change
⚠️ 32 not_sure 1367 1439 +5.3% 0.0128 Already not_sure; Iceberg-only PR is off this query's path, mixed signals are variance

q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on.

tpch_adapted_1_official

⚠️ 3 inconclusive

Flagged queries (3 of 22)
Query Verdict Baseline med (ms) PR med (ms) Change q-value Hint
⚠️ 7 not_sure 113 73 -35.4% <0.0001 Iceberg data-lake PR; TPCH runs on MergeTree, this path is untouched. History is noisy, so -35% is variance
⚠️ 8 not_sure 156 179 +15.1% <0.0001 PR only edits Iceberg metadata code; TPCH query path untouched, so +15% cannot be caused by this change
⚠️ 20 not_sure 248 127 -48.8% <0.0001 Iceberg-only change, off this query's path; -49% with noisy history is run-to-run variance

q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on.

Debug info
  • StressHouse run: 9502d236-f6e1-4524-9851-8a50821fd1a1
  • MIRAI run: 3236e1ab-fe23-48f4-a93a-a593b82605a9
  • PR check IDs:
    • clickbench_263260_1781640146
    • clickbench_263371_1781640176
    • clickbench_263483_1781640276
    • tpch_adapted_1_official_263503_1781640277
    • tpch_adapted_1_official_263692_1781640498
    • tpch_adapted_1_official_263801_1781640595

@scanhex12 scanhex12 closed this Jun 26, 2026
@scanhex12 scanhex12 mentioned this pull request Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants