Running an update operation using
{
findAndModify: "coll",
query: {_id: 1},
remove: false,
new: false,
upsert: true,
update: {
$addToSet: {
values: {$each: [value1, value2 ... value600]},
},
},
}
will check each value in the array against the entire current content (see addToSet)
This doesn't scale and cause higher contention rate with similar operations occurring on the same object
- related to
-
SERVER-117885 Create a benchmark for $addToSet update operator
-
- Closed
-