tinycodinglm / sys /sys-0036.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 19)
034ba67 verified
|
Raw History Blame
1.27 kB
opencode trace
System You are an expert software engineer.

You are an expert software engineer.

User

How does MongoDB's WiredTiger storage engine work?

Assistant

MongoDB uses WiredTiger as its default storage engine since 3.2.

Key concepts:

  • Document-level concurrency control (no page-level locks)
  • B-tree data structure with copy-on-write
  • MVCC (Multi-Version Concurrency Control)
  • Checkpoints every 60 seconds or 2GB of journal data

Storage structure:

  • Tables stored as B-trees
  • Each table has a root page
  • Internal pages contain keys + child page pointers
  • Leaf pages contain key-value pairs

Concurrency:

  • Write conflicts detected via optimistic concurrency control
  • Conflicting transactions retried automatically
  • Document-level locking via WiredTiger's key-value separation

Journaling:

  • Write-ahead log for crash recovery
  • Compressed journal entries
  • Group commit for efficiency

Compression:

  • Snappy (default), zlib, zstd
  • Prefix compression for indexes
  • Dictionary compression for collections