zlacker

[parent] [thread] 2 comments
1. mbb70+(OP)[view] [source] 2023-09-24 22:21:10
I've done the same with MongoDB with findOneAndModify, simple and solid
replies(2): >>ttfkam+cg >>dminor+Zj
2. ttfkam+cg[view] [source] 2023-09-25 01:29:06
>>mbb70+(OP)
I think you mean findOneAndUpdate, and while simple, I wouldn't call it solid.

https://stackoverflow.com/a/76821755

3. dminor+Zj[view] [source] 2023-09-25 02:08:46
>>mbb70+(OP)
Agenda 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.
[go to top]