Hacker News new | ask | show | jobs
by avinassh 1181 days ago
This looks great! I will give it a spin

> e.g. transactions don't work on a single node

any Mongo has this restriction

3 comments

If you are in a development environment, you can set up a single node Replica Set. Some features like transactions and change streams rely on the oplog collection which only exists in Replica Set. A Replica Set can work with a single primary node. You won't have fail over of course, but it's not the point in a dev environment.
Yup, it sucked! Users had to spin up a replica set all the time. Wasn't fun.
wanted to type: any reason* Mongo has this restriction
I don't know tbh. According a post on the MongoDB community forum Transactions are built on concepts of logical sessions they require features which are only available in replica set environment. You can see more here [0]

[0] https://www.mongodb.com/community/forums/t/why-replica-set-i...