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

Insert-or-ignore support

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.3
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: