[SERVER-13078] first bulk API batch is one element short of 1000 limit Created: 06/Mar/14  Updated: 11/Jul/16  Resolved: 11/Mar/14

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.6.0-rc0
Fix Version/s: 2.6.0-rc2

Type: Bug Priority: Major - P3
Reporter: Andreas Nilsson Assignee: Andreas Nilsson
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

When splitting batches the first batch ends up being 999 elements instead of a 1000. Hence a 3000 batch would be split into
999, 1000, 1000, 1.

The reason is that in the addToOperationsList functionthe batch size is incremented and checked before actually adding the last element to the batch.



 Comments   
Comment by Githook User [ 11/Mar/14 ]

Author:

{u'username': u'agralius', u'name': u'Andreas Nilsson', u'email': u'andreas.nilsson@10gen.com'}

Message: SERVER-13078 Fixed batch sizes one off in bulk API
Branch: master
https://github.com/mongodb/mongo/commit/f2b8b2dd800e89ce2fa0eb14e893c650734d6f24

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