[SERVER-7329] mongoimport does not report all failures Created: 11/Oct/12  Updated: 28/Sep/16  Resolved: 21/Jul/14

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: None
Fix Version/s: 2.3.0

Type: Bug Priority: Critical - P2
Reporter: Dwight Merriman Assignee: Dwight Merriman
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-9027 mongoimport does not report all failures Closed
Operating System: ALL
Participants:

 Description   

in this example server is a --configsvr so it won't accept data on a non-config database.

~/main $ ./mongoimport -h localhost --port 27019  -c foo < data.json
connected to: localhost:27019
Thu Oct 11 11:07:06 imported 1 objects
 
~/main $ ./mongo --port 27019
MongoDB shell version: 2.3.0-pre-
connecting to: 127.0.0.1:27019/test
configsvr> show dbs
local	(empty)
test	(empty)
configsvr> use test
switched to db test
configsvr> db.foo.count()
0
configsvr> show collections
configsvr>

In addition to the above which is pretty bad, i recommend we also call getlasterror with w:majority or w:all before terminating.



 Comments   
Comment by auto [ 11/Oct/12 ]

Author:

{u'date': u'2012-10-11T10:11:09-07:00', u'email': u'dwight@10gen.com', u'name': u'Dwight'}

Message: SERVER-7329 treat duplicate key errors as nonerrors from an import job success pov
Branch: master
https://github.com/mongodb/mongo/commit/58f119e899d0f7254353b613838597d23cbdc013

Comment by auto [ 11/Oct/12 ]

Author:

{u'date': u'2012-10-11T10:07:54-07:00', u'email': u'dwight@10gen.com', u'name': u'Dwight'}

Message: SERVER-7329 also now checks at the beginning, after the first write, in addition to ad the end
Branch: master
https://github.com/mongodb/mongo/commit/5527522a466d81bec3cbf8e4dd5b25f880993d09

Comment by auto [ 11/Oct/12 ]

Author:

{u'date': u'2012-10-11T09:51:06-07:00', u'email': u'dwight@10gen.com', u'name': u'Dwight'}

Message: SERVER-7329 bug in the getlasterror check at the end of mongoimport fixed.
Branch: master
https://github.com/mongodb/mongo/commit/5b20f3f12c40541e7baebb639103c38c1d7db4b5

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