Skip to main content
Iceberg was designed to solve correctness and reliability problems that affect traditional table formats, especially when running on cloud object stores like Amazon S3. It provides strong consistency guarantees without requiring distributed locks or consistent listing.

The Hive Problem

Traditional Hive tables have fundamental reliability issues:
Hive’s Architecture Flaws:
  • Tracks partitions in a central metastore
  • Tracks files within partitions via directory listings
  • Makes atomic table changes impossible
  • Requires O(n) listing calls for query planning
  • Breaks on eventually consistent storage (S3)
Problems this causes:
  1. Race conditions - Concurrent writes can corrupt table state
  2. Partial visibility - Readers may see incomplete commits
  3. Incorrect results - Eventually consistent listing returns wrong file sets
  4. Slow planning - Must list every partition directory

Iceberg’s Solution

Iceberg uses a persistent metadata tree to track all data files:
All updates create a new metadata file and atomically swap the pointer to it. This provides:
  • Serializable isolation - All changes occur in a linear history
  • Reliable reads - Readers see consistent snapshots without locks
  • Version history - Complete audit trail of all changes
  • Safe operations - Compaction, late data, and deletes are safe

Atomic Commits

Every table update is atomic:
How it works:
  1. Read current table metadata file
  2. Create new manifest files listing new/changed data files
  3. Create new manifest list combining old and new manifests
  4. Create new metadata file pointing to new manifest list
  5. Commit by atomically swapping metadata file pointer
If step 5 fails (another writer committed first), the entire operation is invisible and can be retried.

Atomic Swap Mechanisms

Different catalog implementations provide atomicity differently:
Uses Hive’s conditional update on table properties:
Uses conditional update with version checking:
Uses commit hash-based optimistic locking:
Uses compare-and-swap on metadata location:

Serializable Isolation

Iceberg provides serializable isolation - the strongest isolation level:
Serializable Isolation: All table changes occur in a single, linear history. Concurrent operations appear to execute sequentially.

How Readers See Consistency

Readers are isolated from concurrent writes:
Readers never need locks:
  • Snapshots are immutable
  • Readers pin a snapshot at table load time
  • Concurrent writes create new snapshots
  • Readers remain on their snapshot until explicitly refreshed

How Writers Achieve Serializability

Writers use optimistic concurrency:
The result: A linear history (10 → 11 → 12) even though writes were concurrent.

Concurrent Write Operations

Multiple writers can operate concurrently using optimistic concurrency:

Append Operations

Appends are highly concurrent:
Appends succeed unless:
  • The table was deleted
  • Schema validation fails
  • Required properties aren’t met

Retry Optimization

Writers structure operations to minimize retry cost: Good: Appends create new manifests that can be reused
Expensive: Rewrites require recreating manifests

Conflict Resolution

Operations specify assumptions that must hold for commit:
Common validation patterns:
  • Append - No assumptions, always retryable
  • Compaction - Assumes source files exist
  • Delete - Assumes files to delete exist
  • Replace - Assumes schema/partition spec compatible

Version History and Rollback

All snapshots form a complete version history:
Rollback to any previous snapshot:
Rollback is metadata-only:
  • Creates a new snapshot pointing to old state
  • No data files are rewritten
  • Instant operation regardless of table size

Safe File-Level Operations

Atomic commits enable safe table maintenance:

Safe Compaction

Compact small files without corruption risk:
Without atomicity, compaction could:
  • Leave duplicate data (compacted + originals)
  • Lose data (delete originals before adding compacted)
  • Corrupt table state (partial commit)

Safe Late Data

Add late-arriving data to old partitions:

Safe Delete

Delete files or partitions atomically:

Compatibility with Object Stores

Iceberg works correctly on eventually consistent storage:
No Listing Required: Iceberg never uses directory listing to find data files. All files are tracked explicitly in manifests.

S3 Compatibility

Iceberg is fully compatible with S3:
  • No consistent listing needed - Files tracked in manifests, not via listObjects
  • No rename operations - Files written in-place and never moved
  • Atomic commits - Via catalog’s atomic swap (Glue, Hive, etc.)

Required File System Operations

Iceberg only requires:
  1. In-place write - Write files to final location
  2. Seekable reads - Random access for columnar formats
  3. Delete - Remove old files during maintenance
Not required:
  • Rename/move operations
  • Directory listing
  • Consistent listing
  • File locking

Performance Benefits

Reliability features also improve performance:

O(1) Planning

Result: Plan 100TB table on a single node in seconds.

Distributed Planning

File pruning happens on worker nodes:
Benefits:
  • No metastore bottleneck
  • Scales to thousands of workers
  • Uses column statistics for aggressive pruning

Finer-Grained Partitioning

O(1) planning enables more partitions:

Isolation Level Comparison

Reliability Guarantees Summary

All table changes occur in a linear history of atomic updates. Concurrent operations never cause corruption or partial visibility.
Readers see a consistent snapshot without locks. Concurrent writes don’t affect ongoing reads.
Complete audit trail of all changes. Rollback to any previous state instantly.
Compaction, deletes, and schema changes are atomic and safe, even with concurrent readers/writers.
Works correctly on S3 and other eventually consistent storage without requiring listing or rename.

Learn More

Table Format

Understand the metadata structure that enables reliability

Branching

Use branches for safe testing and validation

Performance

See how reliability features improve performance