[JAVA-1558] Bulk API inserts with UNACKNOWLEDGED write concern are translated into individual inserts Created: 17/Nov/14  Updated: 16/Oct/17  Resolved: 16/Oct/17

Status: Closed
Project: Java Driver
Component/s: Performance, Write Operations
Affects Version/s: 2.12.0, 3.0.0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Alan Spencer Assignee: Unassigned
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related

 Description   

When running a bulk insert using the bulk API and an UNACKNOWLEDGED write concern the driver translates this into individual inserts, as opposed to an insert of the list.

Given the API user has indicated a bulk operation which is unacknowledged, it appears a single insert with all insert operations would be more appropriate. If the user wanted separate inserts, this option is available via the insert API.

For workloads where the number of inserts is high, the difference in performance is considerable



 Comments   
Comment by Jeffrey Yemin [ 16/Oct/17 ]

This now works properly when the driver is connected to a MongoDB 3.6 server, which supports the new OP_MSG wire protocol, which permits unacknowledged commands. We do not plan to change the implementation for when the driver is connected to a server older than MongoDB 3.6.

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