mongoimport --mode=upsert doesn't do bulk upsert

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.4.11, 3.6.3
    • Component/s: mongoimport
    • None
    • Environment:
      linux

      bulk upsert is much faster than the current mode of inserting one at a time.

      if i'm not using upsert mode i can injest much faster using mongoimport.

      if i turn on upsert mode it goes much slower than it should.

      suggested fix: pull _id out of incoming documents and use that as the bulk upsert's selection portion.

      alternately enable a server side replace option that handles dup key error by replacing the doc in mongo instead of favoring what is already there. more like sql replace into rather than update/insert (because what i really want is replace into and i don't need fancy selectors to update documents on non-_id keys).

              Assignee:
              David Golden
              Reporter:
              Derek Wilson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: