diff --git a/Trino-Iceberg-Integration.md b/Trino-Iceberg-Integration.md index e586acc..308c518 100644 --- a/Trino-Iceberg-Integration.md +++ b/Trino-Iceberg-Integration.md @@ -35,6 +35,16 @@ s3.aws-secret-key=YOUR_SECRET_KEY s3.region=us-east-1 ``` +### Recommended: `iceberg.unique-table-location=true` + +Keep Trino's default `iceberg.unique-table-location=true` (already shown in the configuration above). With it enabled, each new table is created at a unique path `s3:////-/`. The UUID suffix gives you three operational properties worth keeping: + +- **Orphan-resistant `DROP` + `CREATE`** — if a `DROP TABLE` cleanup partially fails (filer error, crash mid-cleanup), a fresh `CREATE TABLE` with the same name lands at a new path and is not blocked or polluted by leftover files. +- **Crash-safe aborted creates** — a `CREATE TABLE` that wrote partial state but failed to commit leaves debris under one UUID; the retry uses a new UUID and proceeds cleanly. +- **Defense-in-depth against client-side empty-location pre-flight checks** — Trino runs `listFiles().hasNext()` before commit, and so do some other engines. With unique paths the check sees a fresh empty directory regardless of any historical state at the deterministic name. + +If you prefer the cleaner `s3://///` layout (one directory per table, no `-/` sibling), setting `iceberg.unique-table-location=false` is safe against SeaweedFS — you give up the resistance properties above. Pick whichever trade-off fits your operational model. + ### Multi-Level Namespaces To use nested namespaces (e.g., `db.schema`), add: