Got a severe problem here again. So this seems to be another iteration of the same problem I had about a month ago. I've got a number of records that are not showing up when i query them by _id (which is also the sharding key).
For example, here is the relevant part of the printShardingStatus for this particular data base:
sharding version: { "_id" : 1, "version" : 3 }
shards:
{
"_id" : "shard1",
"host" : "set1/mongo0-a:10000,mongo1-a:10000,mongo2-a:10000"
}
{
"_id" : "shard2",
"host" : "set2/mongo0-a:20000,mongo1-a:20000,mongo2-a:20000"
}
{
"_id" : "shard3",
"host" : "set3/mongo0-a:30000,mongo1-a:30000,mongo2-a:30000"
}
databases:
{ "_id" : "movieclips", "partitioned" : true, "primary" : "shard1" }
movieclips.base chunks:
{ "_id" : { $minKey : 1 } } -->> { "_id" : "234H" } on : shard3 { "t" : 4000, "i" : 0 }
{ "_id" : "234H" } -->> { "_id" : "CK2Fd" } on : shard3 { "t" : 5000, "i" : 0 }
{ "_id" : "CK2Fd" } -->> { "_id" : "HT2w" } on : shard3 { "t" : 7000, "i" : 0 }
{ "_id" : "HT2w" } -->> { "_id" : "Nb2v" } on : shard1 { "t" : 7000, "i" : 1 }
{ "_id" : "Nb2v" } -->> { "_id" : "Yz7gx" } on : shard2 { "t" : 3000, "i" : 2 }
{ "_id" : "Yz7gx" } -->> { "_id" : "e2sb4" } on : shard2 { "t" : 6000, "i" : 2 }
{ "_id" : "e2sb4" } -->> { "_id" : "jCY6e" } on : shard2 { "t" : 6000, "i" : 3 }
{ "_id" : "jCY6e" } -->> { "_id" : "s5MW" } on : shard1 { "t" : 3000, "i" : 6 }
{ "_id" : "s5MW" } -->> { "_id" : "zyxK" } on : shard1 { "t" : 3000, "i" : 7 }
{ "_id" : "zyxK" } -->> { "_id" : { $maxKey : 1 } } on : shard2 { "t" : 3000, "i" : 0 }
Now I've got a record with the _id of "N5gkw". Now according to the output of the printShardingStatus command this record should live in either shard1 or shard2 (not sure if numerics as strings go before or after a-zA-Z). When I run a
> db.base.find({_id:'N5gkw'})
On a mongos connected to the instance i return nothing, but when I connect directly to the master of shard3 and run the command I get a result. I can get a result from the mongos connection by querying different properties of the object however, just not by the _id.
I've tried upgrading to 1.6.4, restarting all the instances in my replica set, restarting all the mongos', arbieters, and config db; and running a repair database on the collection. Even tried re-importing the data used to create the dataset with no luck.
If someone could please tell me how to get the proper records updated quickly I would appreciate it. This bug is reeking havoc on our site right now.