I'm having a simple $inc that has also {upsert: true}
. Meaning that it is supposed to create it if it doesn't exist.
I'm having daily more a than a million of such calls a day. It usually works ok. But from time to time I see that there were two documents created with the same parameters. Meaning that there is a problem with concurrency.
Is there something that I can do to make it concurrent?
According to the following stackoverflow answer it is supposed to be concurrent. How does the $inc modifier work with concurrent requests in mongodb?
The problem is that it isn't by me.