README: document read/write lock concurrency model
This commit is contained in:
@@ -46,9 +46,12 @@ mongosh --port 27017
|
||||
Killed mid-write (`kill -9`), the database recovers all committed writes;
|
||||
the log and compaction both work with relative or absolute `--db` paths.
|
||||
Records up to the announced 16 MB `maxBsonObjectSize` replay correctly.
|
||||
- **Concurrency**: one mutex serializes commands end-to-end (command-level
|
||||
atomicity); the Io worker pool only overlaps connection I/O with command
|
||||
execution — there is no read parallelism. Fine for light workloads.
|
||||
- **Concurrency**: a writer-preferring read/write lock splits command
|
||||
execution — reads (`find`, `count`, `aggregate`, `list*`) run concurrently
|
||||
across connections, writes (CRUD, DDL) are exclusive and totally ordered,
|
||||
and handshake/no-op commands run lock-free. The log append + `fsync` still
|
||||
happen under the write lock, so the crash guarantees are unchanged. Fine
|
||||
for light workloads.
|
||||
|
||||
## Layout
|
||||
|
||||
|
||||
Reference in New Issue
Block a user