Skip to content

Random UUID in Iceberg metadata file names - #133838

Open
asya-ch wants to merge 1 commit into
masterfrom
asya/uuid
Open

asya-ch wants to merge 1 commit into
masterfrom
asya/uuid

Conversation

@asya-ch

@asya-ch asya-ch commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #128600
Related: #126924

Summary

The UUID in the metadata file name was calculated from the previous metadata file. That was a temporary protection against two concurrent writers in Glue. It is not necessary now that the Glue commit sends VersionId.

This PR makes the UUID random and removes setBaseMetadataFile. All writers call setVersion. The Glue commit now throws an exception if Glue returns no VersionId.

The private repository already has this change. This PR removes the difference, which currently breaks the sync of #102065.

Changelog category (leave one):

  • Improvement

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

Metadata files of Iceberg tables in catalogs now have a random UUID in the name. A file left by a failed commit can no longer block later commits to a Glue table.


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

@clickhouse-gh

clickhouse-gh Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [064c20b]

Summary: ❌

job_name test_name status info comment
Finish Workflow FAIL
python3 ./ci/jobs/scripts/workflow_hooks/can_be_merged.py --review-threads FAIL

AI Review

Summary

Reviewed commit 064c20b5567dc537d0754aab5bc733a27d24ea4f. The PR gives catalog-backed Iceberg metadata files random UUIDs so abandoned files cannot reserve a later commit's filename, and requires Glue to return VersionId before issuing a conditional update. No actionable correctness or safety findings.

Missing context / blind spots
  • ⚠️ No local ClickHouse build was available, so the filename unit tests and Glue integration tests were not executed locally. The fetched Praktika report exposed no per-test results for the relevant unit or integration jobs; their runtime results remain unverified.
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Nov 23, 2026
@scanhex12 scanhex12 self-assigned this Nov 23, 2026
return *this;
}

void FileNamesGenerator::setBaseMetadataFile(Int32 base_version, const String & base_metadata_path)

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.

I saw this change in the private repo. I think we need to do a sync PR first

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.

@scanhex12, would you know how to do the sync PR? Let me know if I should close this one then.

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.

There is no special tool) Just go through the iceberg files manually and add it to your sync PR

@asya-ch asya-ch Nov 23, 2026 •

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.

Am a bit confused :) . I thought this was a sync PR. Which other Iceberg files do you want to include here?

@clickhouse-gh clickhouse-gh Bot added the comp-iceberg Apache Iceberg tables: reading and writing Iceberg metadata (snapshots, manifests, schema evoluti... label Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-iceberg Apache Iceberg tables: reading and writing Iceberg metadata (snapshots, manifests, schema evoluti... pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants