Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
3.4.10
-
None
-
None
-
ALL
Description
I've moved some data manually, using moveChunk, and a document is missing. I can find it manually, by querying a shard which has it, but when i make the same query from the sharded shell it's not there. The balancer is now disabled.
mongos> db.smtp_in_auth.find({"_id": ObjectId('5a590cf4016548d302f5eae0')}) |
mongos> db.smtp_in_auth.find({"_id": ObjectId('5a590cf4016548d302f5eae0')}).explain() |
{
|
"queryPlanner" : { |
"mongosPlannerVersion" : 1, |
"winningPlan" : { |
"stage" : "SINGLE_SHARD", |
"shards" : [ |
{
|
"shardName" : "rs4", |
"connectionString" : "rs4/XXX:10104,XXY:10104", |
"serverInfo" : { |
"host" : "XYZ", |
"port" : 10104, |
"version" : "3.4.10", |
"gitVersion" : "078f28920cb24de0dd479b5ea6c66c644f6326e9" |
},
|
"plannerVersion" : 1, |
"namespace" : "db.col", |
"indexFilterSet" : false, |
"parsedQuery" : { |
"_id" : { |
"$eq" : ObjectId("5a590cf4016548d302f5eae0") |
}
|
},
|
"winningPlan" : { |
"stage" : "SHARDING_FILTER", |
"inputStage" : { |
"stage" : "IDHACK" |
}
|
},
|
"rejectedPlans" : [ ] |
}
|
]
|
}
|
},
|
"ok" : 1 |
}
|
mongos>
|
|
|
rs4:PRIMARY> use db
|
switched to db db
|
rs4:PRIMARY> db.col.findOne({"_id": ObjectId('5a590cf4016548d302f5eae0')}) |
null
|
|
|
rs1:PRIMARY> use db
|
switched to db db
|
rs1:PRIMARY> db.col.findOne({"_id": ObjectId('5a590cf4016548d302f5eae0')}) |
{ "_id" : ObjectId("5a590cf4016548d302f5eae0") } |
|
So the cluster thinks that that _id is located on rs4, when it actually resides on rs1. I know from experience that restarting everything a couple of times fix this issue, but i'd rather not do that.