2dbi
Home/MongoDB/Concurrency: Document-Level Locking / MVCC Simulation
MMongoDB·DSAEngineerDistributed Systems / Concurrency

Concurrency: Document-Level Locking / MVCC Simulation

Problem

Simulate document-level concurrency: multiple writers update different documents concurrently without blocking; write-write conflicts on the same doc retry.

Example

writers on different docs proceed; same-doc conflict -> retry

Constraints

  • Snapshot isolation semantics

What MongoDB looks for

Grounded in WiredTiger's MVCC + document-level locking. Reason about snapshot isolation and conflict retries.

added 6 days ago
LeadersAccount