Repository navigation
Register Iceberg namespace in the catalog before writing table files (needed for SeaweedFS) - #114285
Conversation
|
Workflow [PR], commit [2012a0d] Summary: ❌
AI ReviewSummaryThis PR fixes the SeaweedFS ordering bug by creating the namespace before the first metadata write and by tightening the REST error handling, but it also introduces a backward-incompatible Findings
Tests
Final Verdict❌ Changes requested. LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 33/44 (75.00%) · Uncovered code |
`FileLock` is used unconditionally (port pool, docker network lock), but was imported in the optional-deps try block, where any earlier failing import (e.g. `psycopg2`) aborts it: NameError on local runs. Example - https://pastila.nl/?004dba6d/d815bdc27fb4094ff84cac884f4f6edc#XrcrYzqskI1DupUaP0a+Ig==GCM
b4d74f5 to
e356a01
Compare
Files written first turn the namespace into a plain directory, which a catalog sharing the storage view (SeaweedFS) rejects with HTTP 500; the swallowed error left an orphaned metadata file that broke retries. Ensure the namespace before the first write; propagate failures except 404-then-create and 409 (REST) / AlreadyExists (Glue). Co-Authored-By: Claude Fable 5 <[email protected]>
e356a01 to
2012a0d
Compare
| glue_client->CreateDatabase(create_request); | ||
| auto outcome = glue_client->CreateDatabase(create_request); | ||
| if (!outcome.IsSuccess() && outcome.GetError().GetErrorType() != Aws::Glue::GlueErrors::ALREADY_EXISTS) | ||
| { |
There was a problem hiding this comment.
GlueCatalog::createNamespaceIfNotExists now turns every CreateDatabase error except ALREADY_EXISTS into a hard failure. Before this PR, GlueCatalog::createTable ignored CreateDatabase failures and still attempted CreateTable, which is what lets a principal create a table inside a pre-provisioned Glue database without glue:CreateDatabase. After moving the call into IcebergMetadata::createInitial, that valid permission model now aborts here even though the namespace already exists. Please mirror the REST approach here as well: first prove the namespace is absent (or otherwise distinguish AccessDenied on an existing namespace from a real create failure) before throwing.
There was a problem hiding this comment.
And it's okay and much better.
|
Fixed already in #113397 |
5c5dd13
Resolves one conflict in listTablesInNamespace. Master made createReadBuffer virtual and dropped its default arguments (ClickHouse#114285, S3TablesCatalog SigV4 signing), so the three-argument call this branch had re-indented no longer compiles. Took master's five-argument form at the indentation the branch's try block requires; the tolerate-and-skip semantics are unchanged.
Backport #114285 to 26.7: Register Iceberg namespace in the catalog before writing table files (needed for SeaweedFS)
Backport #114285 to 26.6: Register Iceberg namespace in the catalog before writing table files (needed for SeaweedFS)
Backport #114285 to 26.5: Register Iceberg namespace in the catalog before writing table files (needed for SeaweedFS)
… catalog before writing table files (needed for SeaweedFS)
… catalog before writing table files (needed for SeaweedFS)
… catalog before writing table files (needed for SeaweedFS)
Files written first turn the namespace into a plain directory, which a catalog sharing the storage view (SeaweedFS) rejects with HTTP 500; the swallowed error left an orphaned metadata file that broke retries. Ensure the namespace before the first write; propagate failures except 404-then-create and 409 (REST) / AlreadyExists (Glue).
Example: https://pastila.nl/?01f91a25/620869a81af815ba6927860efbc72af4#NhE2Nbzh3AHhUHhA5Fdkzw==GCM
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Register Iceberg namespace in the catalog before writing table files (needed for SeaweedFS)
Version info
26.8.1.1402(included in26.8and later)26.7.6.14,26.6.4.20,26.5.8.19