-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
If insert is attempted but record with such _id already exists, it's ignored, except for "E11000 duplicate key error index" messages in server logs.
It would be nice to be able to indicate that ignoring duplicates is actually intended behavior, to avoid such errors.
A related issue is that if a bulk insert is attempted, and any of the _ids already exists, the entire batch fails. This could be covered by the same mechanism of indicating that duplicate _ids should be silently ignored.
Support for this option could then be added to mongoimport etc.
This is not upsert - no fields in existing records should be overwritten.