Just theoretically speaking, isn’t insertMany bulk operation with ordered set to false logically the same as writing updateMany with $setOnInsert defined and upsert set to true?
I ask this becuase insertMany with ordered: false will “ignore” duplicate keys, so will updateMany with setOnInsert defined and upsert: true.
Please correct me if I’m wrong, but I believe I may have stumbled upon this.
Also, if it is the same, is there any performance difference between the two?