[SERVER-11967] No records exported using mongodump in sharded/replicated set up Created: 05/Dec/13  Updated: 11/Jul/16  Resolved: 14/Mar/14

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

Type: Bug Priority: Critical - P2
Reporter: Machiel Groeneveld Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux 3.2.0-53-virtual #81-Ubuntu SMP Thu Aug 22 21:21:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


Issue Links:
Duplicate
Operating System: Linux
Participants:

 Description   

Calling mongodump through mongos results in zero records when it should return the records that are in the database (in this case about 44000).

Mongos is running on the same hosts as one primary node. Behavior is not consistent though, sometimes it works.

Command used:
/opt/mongodb/bin/mongodump -h 127.0.0.1 --port 27018 -d db_production -c collection_views -q '

{"time_id":20131203}

'

Set up has 3 shards, 4 nodes per shard.

There is a TTL index on this collection:

{
		"v" : 1,
		"key" : {
			"created_at" : 1
		},
		"ns" : "db_production.collection_views",
		"name" : "created_at_1",
		"expireAfterSeconds" : 432000,
		"background" : true
}



 Comments   
Comment by Shaun Verch [ 14/Mar/14 ]

Hi Machiel,

Thanks for the update. Closing now, but feel free to reopen if you see this again.

Thanks,
~Shaun Verch

Comment by Machiel Groeneveld [ 14/Mar/14 ]

It seems to be fixed. We upgraded to 2.4.6 but also replaced some nodes. You can close the issue as far as I'm concerned

Comment by Shaun Verch [ 13/Mar/14 ]

Hi Machiel,

Are you still seeing this issue? If so, can you let us know the results of running Richard's suggestion above? We haven't been able to reproduce this issue, so any information you can provide will be helpful.

Thanks,
~Shaun Verch

Comment by Richard Kreuter (Inactive) [ 16/Dec/13 ]

Hi Machiel,

Would you be willing to try running the equivalent mongodump command without the -q option, to distinguish whether this a query routing problem or a query problem?

If so, please run

/opt/mongodb/bin/mongodump -h 127.0.0.1 --port 27018 -d db_production -c collection_views

and paste the output from mongodump.

Thank you,
Richard

Comment by Machiel Groeneveld [ 10/Dec/13 ]

We are seeing the same behavior on another collection, inconsistent results when using mongodump. This collection doesn't have a TTL index.

Comment by Machiel Groeneveld [ 09/Dec/13 ]

Mongodb output:

connected to: 127.0.0.1:27018

Sat Dec 7 15:08:11.662 DATABASE: db_production to dump/db_production
Sat Dec 7 15:08:11.807 db_production.collection_views to dump/db_production/collection_views.bson
Sat Dec 7 15:08:11.828 0 objects
Sat Dec 7 15:08:11.828 Metadata for db_production.collection_views to dump/db_production/collection_views.metadata.json

27018 - is a port of mongos running on that machine

Collection stats:

db.collection_views.stats()
{
"sharded" : false,
"primary" : "rs1",
"ns" : "db_production.collection_views",
"count" : 191830,
"size" : 304428704,
"avgObjSize" : 1586.9712975029975,
"storageSize" : 11451846624,
"numExtents" : 26,
"nindexes" : 4,
"lastExtentSize" : 2146426864,
"paddingFactor" : 1,
"systemFlags" : 1,
"userFlags" : 1,
"totalIndexSize" : 39441024,
"indexSizes" :

{ "_id_" : 9868432, "uuid_hash_1" : 16343824, "time_id_1" : 7382928, "created_at_1" : 5845840 }

,
"ok" : 1
}

Comment by Eliot Horowitz (Inactive) [ 05/Dec/13 ]

Can you send the mongodump output and the collection stats please?

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