3 ms·
"How do you do that with single row only atomic transactions?" In this scheme, you should theoretically be able to implement transactional protocols (two phas
by DannyBee 9y ago
"How do you do that with single row only atomic transactions?"
In this scheme, you should theoretically be able to implement transactional protocols (two phase commit and friends, see, e.g., http://dl.acm.org/citation.cfm?id=3027893 http://dl.acm.org/citation.cfm?id=3027893) that ensure you do not actually sell two people the same thing, but may return an error at buy time that the inventory disappeared while you tried to buy it.
You pay a sometimes-very-high cost in throughput.
Of course, talking about mongodb, it's probably broken in a myriad of ways no matter what you do :)
- electricEmu 9y agoNailed it, but I'm curious where you think the throughout suffered; we didn't encounter that problem.