Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
None
Description
So, running mongodb-3.2.6-rc version of mongoimport (without the --stopOnError flag)
~/Mongo $ /Users/kay/Mongo/mongodb-3.2.6-rc0/bin/mongoimport --db test --collection foo --file foo.txt
|
2016-04-29T13:35:19.550-0400 connected to: localhost
|
2016-04-29T13:35:19.551-0400 error inserting documents: E11000 duplicate key error collection: test.foo index: _id_ dup key: { : 2.0 }
|
2016-04-29T13:35:19.551-0400 imported 0 documents
|
But it did insert the non-conflicting documents:
> db.foo.find()
|
{ "_id" : 2, "x" : 2 }
|
but after doing the import
> db.foo.find()
|
{ "_id" : 2, "x" : 2 }
|
{ "_id" : 3, "x" : 3 }
|
{ "_id" : 1, "x" : 1 }
|
So, shouldn't the message tell me it imported 2 documents?