[SERVER-3086] mongoexport only exports one shard's worth of data Created: 12/May/11  Updated: 12/Jul/16  Resolved: 03/Jun/11

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 1.9.0
Fix Version/s: 1.9.1

Type: Bug Priority: Major - P3
Reporter: Kristina Chodorow (Inactive) Assignee: Greg Studer
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Operating System: ALL
Participants:

 Description   

Run:

$ python simple-setup.py --chunksize=1

In the shell:

> for(i=0;i<10000000;i++) {db.foo.insert(

{x:1,y:i,date:new Date(), str:"all the talk on the market"}

); }
> db.foo.count()
10000000

Export this collection:

$ mongoexport -d test -c foo -o foo.json
connected to: 127.0.0.1
exported 2610450 records



 Comments   
Comment by Greg Studer [ 03/Jun/11 ]

Issues still remain with other sharded queries including count() seen in this test case above, so leaving this open for now.

In some cases during migration, count() can still report more than the correct number of documents.

Comment by auto [ 03/Jun/11 ]

Author:

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

Message: dbGetMore needs to filter out newly migrated results SERVER-3086
Branch: master
https://github.com/mongodb/mongo/commit/6a1bc036308fdd1b867a072e5ba70afc04556e07

Comment by auto [ 03/Jun/11 ]

Author:

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

Message: always use parallelcursor SERVER-3086
Branch: master
https://github.com/mongodb/mongo/commit/e329ba1baea62adcca1a2882592cbc1df89f9d31

Comment by Greg Studer [ 02/Jun/11 ]

Seems like the version change due to a migration aborts the clustered cursor.

Comment by Greg Studer [ 01/Jun/11 ]

This does not appear to fix the issue, useful in any case, but there appear to be other factors.

Comment by auto [ 01/Jun/11 ]

Author:

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

Message: add slaveOk option to mongoexport SERVER-3086
Branch: master
https://github.com/mongodb/mongo/commit/c3d9873759eec207dfab3868b2e5f780d3a09743

Comment by Greg Studer [ 01/Jun/11 ]

yes, appears to be related to slaveok and slaves not being up-to-date

Exported records increase in number over time.

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