Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2813

Shell Bulk API additions

    XMLWordPrintableJSON

Details

    Description

      1. There is no discussion of return values from the bulk operations, what to expect and how to interpret them.
      After a bulk operation you might want to verify nUpserted, nMatched, nRemoved, getUpsertedIds(), getWriteErrorCount() etc.

      2. I would also like some word of warning somewhere in the docs. This is a low confidence API in the sense that there is no real error recovery. If you get one or several write errors during the bulk op there is no way of re-executing the batch and it is fairly difficult to analyze which operations failed and for which reasons. Stated crudely, if you care a lot about data loss you should not use this API.

      3. For unordered bulks we should point out that certain operation combinations are illegal, or non-sensical. For instance a

      insert({a:1})
      remove({a:1})

      will either be a no-op (add and remove) or potentially fail on the remove.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            andreas.nilsson Andreas Nilsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 41 weeks, 6 days ago