-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Write Operations
-
None
To maintain the semantic that the batch stops as soon as there is a single error...if a user tries to insert 10k documents but only 2k documents fit with the maximum message size, the driver does five 2k inserts. In that case, after each 2k insert, it should call getLastError, and if there was an error, fail. This is whether or not the user wants GLEs called. This is the only way to guarantee the semantics."
So, even if WriteConcern.UNACKNOWLEDGED, you still must call getLastError after each batch, except for the last batch.
This is only if WriteConcern.continueOnError is false. If it's true, the existing algorithm is ok.
- is depended on by
-
DRIVERS-1888 Split legacy batch inserts into many messages
- Closed