Details
-
Improvement
-
Status: Closed
-
Major - P3
-
Resolution: Works as Designed
-
2.9.3
-
None
-
None
Description
The JavaDoc for the bulk insert method does not describe the method's postconditions on failure: is the collection unchanged, or might the insertion have succeeded partially? In the latter case, the operation cannot be retried as-is, because there's no way to determine which documents were inserted and which were not.
Ideally, the method should succeed or fail atomically – otherwise, bulk insert becomes a lot less useful. However, in the event that that behavior can't fit with Mongo's typical transactional behavior, then the operation should throw some subclass of MongoException that identifies which documents were inserted and which were not.
Without an ability to identify and respond to failures, this method is not useful in a production system.
Attachments
Issue Links
- is related to
-
DOCS-766 Sharded bulk insert in 2.0/2.2 mongos must be verified by application logic
-
- Closed
-