[SERVER-3834] mongoimport from mongoexport file with --jsonArray in 2.0 broken Created: 13/Sep/11  Updated: 11/Jul/16  Resolved: 27/Sep/11

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 2.0.0
Fix Version/s: 2.0.1, 2.1.0

Type: Bug Priority: Major - P3
Reporter: Kenny Inggs Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64 bit


Operating System: ALL
Participants:

 Description   

mongoimport from mongoexport file with --jsonArray in 2.0 is broken

mongoimport only imports 4/10 items in the collection if I use --jsonArray

Repro
MongoDB shell version: 2.0.0
connecting to: test
> db.test_collection.insert(

{a:1}

)
> db.test_collection.insert(

{a:2}

)
> db.test_collection.insert(

{a:3}

)
> db.test_collection.insert(

{a:4}

)
> db.test_collection.insert(

{a:5}

)
> db.test_collection.insert(

{a:6}

)
> db.test_collection.insert(

{a:7}

)
> db.test_collection.insert(

{a:8}

)
> db.test_collection.insert(

{a:9}

)
> db.test_collection.insert(

{a:10}

)

> mongoexport -d test -c test_collection -o test.json --jsonArray
connected to: 127.0.0.1
exported 10 records

> mongoimport -d test -c test_collection --file test.json --jsonArray
connected to: 127.0.0.1
imported 4 objects



 Comments   
Comment by auto [ 09/Oct/11 ]

Author:

{u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: Fix mongoimport on jsonArrays. SERVER-3834
Branch: v2.0
https://github.com/mongodb/mongo/commit/0f605b5ab37adaa3caa6bfb2ff3526b8202c94dc

Comment by auto [ 27/Sep/11 ]

Author:

{u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: Fix mongoimport on jsonArrays. SERVER-3834
Branch: master
https://github.com/mongodb/mongo/commit/e570d7e9dd92b45537c9b59071320f128cd6d4ae

Comment by Christopher Harris [ 24/Sep/11 ]

Agreed. With a JSON array of 12 items, only 4 are inserted into the specified collection of the specified DB. It works as expected in 1.8.3 but not in 2.0

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