[SERVER-13081] shell bulk API sends unordered bulks highly unoptimized Created: 06/Mar/14  Updated: 10/May/22

Status: Backlog
Project: Core Server
Component/s: Shell
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andreas Nilsson Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Unresolved Votes: 0
Labels: 26qa, move-sa, platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Participants:

 Description   

When creating an unordered bulk operation containing operations of different kinds they are not compiled into bigger batches but simply sent in the order they arrive.

For example the sequence:

insert()
update() 
insert()
update()
insert()

would be sent in 5 unique batches each containing one operation instead of two larger ones.

var batch = coll.initializeUnorderedBulkOp();
for (var i=0;i<5001;i++) {
batch.insert({_id:i});
batch.find({c:i}).removeOne();
}
result = batch.execute();

would result in 10000 commands being sent to the server instead of the necessary 10. Most users probably won't encounter this but it's not pretty. Essentially the unordered implementation behaves like the ordered except that execution does not terminate on server errors.



 Comments   
Comment by Steven Vannelli [ 10/May/22 ]

Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions.

Generated at Thu Feb 08 03:30:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.