Details
-
Improvement
-
Resolution: Won't Fix
-
Major - P3
-
None
-
2.12.4
-
None
-
(copied to CRM)
Description
According to the specification, in case of error MongoDB server sends back the index of the failed operation(s): writeError.getIndex(), which can be used on the driver side to identify the appropriate operation in the batch.
Internally, the BulkWriteOperation class already maintains a list of operations, but currently that list is not exposed to external access. We could simplify the error handling for users by changing that and allowing to get the operation from the BulkWriteOperation object by its index.