-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: manual
-
Labels:
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.
- is related to
-
SERVER-12995 Updating docs with bulk API does not affect nModified
- Closed