5 ms·
I've done the same with MongoDB with findOneAndModify, simple and solid
by mbb70 3y ago
I've done the same with MongoDB with findOneAndModify, simple and solid
- dminor 3y agoAgenda uses this, and we found the hard way on mongo 4 that it can lead to mongo spinning the CPU at 100% if it gets too many at once. No idea if they've fixed it in later versions.
- ttfkam 3y agoI think you mean findOneAndUpdate, and while simple, I wouldn't call it solid. https://stackoverflow.com/a/76821755 https://stackoverflow.com/a/76821755