The Hive Problem
Traditional Hive tables have fundamental reliability issues: Problems this causes:- Race conditions - Concurrent writes can corrupt table state
- Partial visibility - Readers may see incomplete commits
- Incorrect results - Eventually consistent listing returns wrong file sets
- Slow planning - Must list every partition directory
Iceberg’s Solution
Iceberg uses a persistent metadata tree to track all data files:- 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:- Read current table metadata file
- Create new manifest files listing new/changed data files
- Create new manifest list combining old and new manifests
- Create new metadata file pointing to new manifest list
- Commit by atomically swapping metadata file pointer
Atomic Swap Mechanisms
Different catalog implementations provide atomicity differently:Hive Metastore
Hive Metastore
Uses Hive’s conditional update on table properties:
AWS Glue
AWS Glue
Uses conditional update with version checking:
Nessie / Git-like Catalogs
Nessie / Git-like Catalogs
Uses commit hash-based optimistic locking:
REST Catalog
REST Catalog
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:- 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:Concurrent Write Operations
Multiple writers can operate concurrently using optimistic concurrency:Append Operations
Appends are highly concurrent:- 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 reusedConflict Resolution
Operations specify assumptions that must hold for commit:- 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:- 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:- 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:- In-place write - Write files to final location
- Seekable reads - Random access for columnar formats
- Delete - Remove old files during maintenance
- Rename/move operations
- Directory listing
- Consistent listing
- File locking
Performance Benefits
Reliability features also improve performance:O(1) Planning
Distributed Planning
File pruning happens on worker nodes:- 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
Serializable Isolation
Serializable Isolation
All table changes occur in a linear history of atomic updates. Concurrent operations never cause corruption or partial visibility.
Reliable Reads
Reliable Reads
Readers see a consistent snapshot without locks. Concurrent writes don’t affect ongoing reads.
Version History
Version History
Complete audit trail of all changes. Rollback to any previous state instantly.
Safe Maintenance
Safe Maintenance
Compaction, deletes, and schema changes are atomic and safe, even with concurrent readers/writers.
Object Store Compatible
Object Store Compatible
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