[JAVA-1539] Allow access to the list of operations in the BulkWriteOperation class Created: 07/Nov/14  Updated: 05/Jan/18  Resolved: 19/May/16

Status: Closed
Project: Java Driver
Component/s: Write Operations
Affects Version/s: 2.12.4
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Alexander Komyagin Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Case:

 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.



 Comments   
Comment by Jeffrey Yemin [ 19/May/16 ]

This issue is addressed in the 3.x driver with the new MongoCollection class's bulkWrite method, which takes an application-managed List of writes.

Generated at Thu Feb 08 08:54:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.