[SERVER-2395] Allow multidoc (bulk) insert Created: 22/Jan/11  Updated: 12/Jul/16  Resolved: 29/Sep/11

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Improvement Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: Greg Studer
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-3819 Support bulk insert in shell Closed
Participants:

 Description   

Check the first argument, if it is array, treat each item as an doc and do a bulk insert.



 Comments   
Comment by auto [ 30/Sep/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: can't use count in test SERVER-2395
Branch: master
https://github.com/mongodb/mongo/commit/ce2148699b30f457c42461e29dd3a7c8ddd6eeda

Comment by auto [ 29/Sep/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: final fixup for SERVER-2395
Branch: master
https://github.com/mongodb/mongo/commit/509704ea36d9ff75431e08be1538391f7a090bb9

Comment by auto [ 29/Sep/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: test case for bulk insert during sharding SERVER-2395
Branch: master
https://github.com/mongodb/mongo/commit/6ff18f1db90d7d18e25b7cda735fdd5d0e2ac595

Comment by auto [ 29/Sep/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: basic test for bulk insert from shell SERVER-2395
Branch: master
https://github.com/mongodb/mongo/commit/52d261771240ddbe95c4f3544acffc0f78efb3dc

Comment by auto [ 29/Sep/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: Add bulk insert to shell SERVER-2395
Branch: master
https://github.com/mongodb/mongo/commit/d419e25c8313b38ac9eba546b82fbbd910e2f5d6

Comment by Greg Studer [ 29/Sep/11 ]

Actually I figured it'd be useful for testing, since there a bulk insert issue that I didn't want to use the PHP driver to reproduce is the reason I created the branch. It's a pretty simple change.

Comment by Scott Hernandez (Inactive) [ 19/Sep/11 ]

Yes, mostly for convenience and orthogonality with other drivers; ?js + bulk != perf? (probably not)

Comment by Dwight Merriman [ 19/Sep/11 ]

it seems to me bulk insert isn't necessarily needed in the shell as performance there isn't super critical and the shell may be slower than the db anyway.

however db.foo.insert( [.., ..., ...] )

might be convenient.

Comment by Greg Studer [ 19/Aug/11 ]

Created branch to fix this while tracking down another bug.

Generated at Thu Feb 08 02:59:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.