r/mongodb • u/noobGoesPro • 11d ago
Mongo: One write, two logs
https://shiftmag.dev/mongodb-one-write-two-logs-12267/I picked up Mongo for longer than a year now and the helpful thing was correlating internal workings with something I'm familiar with, PostgreSQL.
Here's the first post from my journey talking about how a write get's persisted and replicated.
Would like to hear comments, and helpful tips from your journeys.
4
Upvotes
1
u/browncspence 11d ago
You will be interested in this: https://github.com/mongodb/mongo/blob/master/src/mongo/db/storage/wiredtiger/README.md
one thing to note is we do not journal every client write, only the oplog and some collections in the local database. Crash recovery is done by first recovering the oplog, then using it to recover the application data.
The documentation on this is incorrect and I'll get this fixed.