Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1222

Insert-or-ignore support

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.3
    • 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.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            taw Tomasz Wegrzanowski
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: