Synthesis and Self-Test

Synthesis

Immutability plus atomic CAS is the entire foundation everything else stands on

Time travel (see Schema evolution and time travel) isn't a separate feature bolted onto either format — it's the free byproduct of never mutating a written file and keeping old pointers valid. If either format allowed in-place mutation of a manifest or a checkpoint, snapshot isolation (see Schema evolution and time travel) and safe concurrent writers (see Concurrency control) would break simultaneously, because a reader mid-scan could no longer trust that the files its pinned snapshot references still mean what they meant when it started.

Hidden partitioning and compaction are in tension — which is why maintenance is permanent, not one-time

Bucket-transform partitioning (see Partitioning and data skipping) spreads a high-cardinality column across a fixed number of buckets specifically to avoid the partition explosion that would make the Iceberg's metadata tree part's manifest-summary pruning useless. But the moment a streaming writer commits into those buckets continuously, the Compaction and maintenance part's small-file problem reappears inside each bucket — requiring the same compaction discipline good partitioning was supposed to reduce the need for.

Optimistic concurrency and compaction jobs compete for the same commit slot

A table that ran conflict-free for a year as pure appends (the Concurrency control part's easy case) starts seeing real conflicts and retries the day a nightly compaction job is added — because compaction is a genuine overwrite contending with the streaming writer over the same files. The operational act of "adding a maintenance job" is itself a concurrency-control event, not a side operation.

Schema-evolution safety and protocol versioning are the same idea at two scopes

Field-ID column tracking (see Schema evolution and time travel) protects a single table's history from breaking under a rename. Table-features/protocol-version gating (see Delta's transaction log) protects the same table from being silently misread by an old client that doesn't understand a newer feature at all. Both exist because "the reader silently does the wrong thing instead of erroring" is the failure mode every mechanism in this guide is ultimately trying to eliminate.

The catalog choice determines whether Concurrency control's guarantee is even real

All of optimistic concurrency's safety rests on the catalog's CAS being genuinely atomic. A homegrown or misconfigured catalog (see Catalogs and engine interop) that does read-then-write without real atomicity silently reintroduces the exact race the rest of the architecture was built to eliminate — and nothing above the catalog layer can detect that it happened.

Self-Test

Question 1

A Spark job appends 500 tiny files to an Iceberg table every 30 seconds, with no compaction scheduled. Six months later planning time has grown noticeably — even though COUNT(*) shows the row count is flat (an aggressive TTL deletes old rows). Why did planning time grow if data volume didn't?

Show answer

Row count staying flat doesn't mean file/manifest count stayed flat. Every 30-second commit adds new manifest entries (see Iceberg's metadata tree); TTL deletion removes rows, but the Compaction and maintenance part explains removed files aren't compacted away automatically. More importantly, even if old files were fully removed, six months of small commits still means six months' worth of manifest-list entries and small manifest files accumulated, each contributing planning overhead — the Iceberg's metadata tree part's "manifest explosion" trap — regardless of current row count. Planning cost scales with commit/file count, not row count. The fix is scheduling rewrite_manifests and rewrite_data_files; it isn't addressable by the TTL policy at all.

Question 2

Two teams write to the same Delta table on S3: one via Databricks, one via a homegrown Spark job on EMR configured years ago, before S3 added native conditional writes. What's the single most important thing to verify — and why doesn't "it's worked fine for a year" prove it's safe?

Show answer

Verify the EMR job's LogStore configuration actually points at a multi-writer-safe implementation (the DynamoDB-backed commit coordinator, pre-2024) rather than assuming a plain S3 PUT satisfies the atomic put-if-absent Delta's commit protocol requires (see Concurrency control). "Worked fine for a year" doesn't prove safety because the failure mode is a race — it manifests only when two writers' commits to the same next version number land close enough in time to actually collide, which can be rare enough to never occur across low-traffic periods and still be a live, unfixed correctness bug waiting for a burst of concurrency.

Question 3

An Iceberg table is partitioned by identity(user_id). An engineer proposes fixing slow queries by switching to bucket(16, user_id) via ALTER TABLE … SET PARTITION SPEC. Does this require rewriting existing data — and will old queries filtering on user_id still get pruning against old files?

Show answer

No rewrite required — this is exactly the Partitioning and data skipping part's partition evolution: the new spec applies only to files written after the ALTER. Old files keep referencing the old identity(user_id) spec-id, and Iceberg's manifests record which spec-id each file was written under (see Iceberg's metadata tree), so planning interprets old files under the old spec and new files under the new one. Queries filtering on user_id still get pruning against old files — just via the old identity partition value rather than the new bucket value. Both remain valid, spec-tagged partition values the planner can use.

Question 4

A CDC pipeline runs row-level MERGE INTO against both an Iceberg table (v2 positional deletes) and a Delta table (deletion vectors) at similar volume. Both accumulate deletes against the same hot data files for months with no compaction. What's the shared failure mode, and why doesn't either format's design prevent it automatically?

Show answer

Both suffer the same merge-on-read cost growth from the Compaction and maintenance part: every read against an affected data file must merge it against a growing number of accumulated delete files/deletion-vector entries, so query latency degrades gradually and silently — no error, no hard limit anywhere in either format to force a fix. Neither prevents it automatically because MoR deletes are deliberately designed to defer the rewrite cost — that deferral is the entire point (cheap writes). Which makes compaction an unavoidable, permanent operational responsibility, not a one-time migration step, in both systems.

Question 5

Why does neither Iceberg nor Delta Lake need a lock server, yet both correctly prevent two concurrent writers from silently corrupting a table?

Show answer

Both rely on optimistic concurrency control (see Concurrency control): each writer speculatively builds its full change against the version it started from, entirely offline, and needs a single atomic operation only at the very end — a compare-and-swap on the catalog's metadata pointer (Iceberg) or an atomic put-if-absent of the next numbered log file (Delta). Because everything upstream of that final atomic step is immutable and untouched by anyone else (see Iceberg's metadata tree, Delta's transaction log), there's nothing to lock. The only shared, contended resource in the entire system is that one atomic operation, and a losing writer simply detects the loss (CAS failure / file-already-exists) and retries against the new base.

Question 6

You run expire_snapshots on a purely append-only Iceberg table that has been streaming for a year, expecting to reclaim significant storage. Almost nothing is freed. Why — and what commit type would have had to run for GC to free data files?

Show answer

In an append-only history nothing ever becomes unreachable (see Iceberg's metadata tree): each new manifest list carries every old manifest entry forward by value, so every manifest and data file ever written stays reachable from the current snapshot. Expiring old snapshots therefore reclaims only superseded metadata.json files and superseded manifest-list files — never manifests or data files. Reachability breaks only when a commit removes a file from the live set: a delete, an overwrite, or compaction (see Compaction and maintenance). That's also why compaction and expire_snapshots are run as a pair — compaction makes old small files unreachable-from-current, and only the subsequent expiry actually deletes bytes.

Question 7

Iceberg supports TIMESTAMP AS OF using snapshot-log, and VERSION AS OF using snapshots. Why can't snapshot-log alone serve both — and what does a rollback do to make that distinction load-bearing rather than academic?

Show answer

A snapshot-log entry is only {timestamp-ms, snapshot-id} — an id, with no manifest-list pointer and no parent link. It's a secondary index on time; snapshots is the table of records it points into, so time travel is always two lookups (see Iceberg's metadata tree). A rollback makes the distinction concrete: rollback_to_snapshot(S2) appends {13:00, S2} to the log without touching the DAG, so the log alone records the non-monotonic path S1 → S2 → S3 → S2 → S4 that snapshots can't express — while conversely, incremental/CDC reads, GC reachability, and rollback validation all need the parent-snapshot-id ancestry that only snapshots carries. Lineage and "what was current when" are genuinely different questions.

Question 8

Your Iceberg table's Query-A-shaped queries (filtering on the partition column) have gotten slower than an equivalent Delta table's, even though the Partitioning and data skipping part says Iceberg's hierarchical pruning should beat Delta's flat checkpoint scan at scale. What's the most likely cause, and why does Delta not have the same problem?

Show answer

rewrite_manifests almost certainly isn't running (see Iceberg's metadata tree, Partitioning and data skipping). Iceberg's advantage assumes a modest number of large manifests; with thousands of tiny ones, "open the surviving manifests" becomes thousands of separate object-storage GET requests — latency- and request-overhead-bound. Delta reads a single checkpoint Parquet file and scans one column across all rows: throughput-bound, one request. Delta gets that bound for free by construction because the checkpoint interval caps it; Iceberg only matches it if manifest compaction is maintained. Unmaintained, Iceberg degrades toward the worse shape — the structural advantage is real but conditional on maintenance.