|
Thank you for clarifying. Because MongoDB 3.2 reached end of life in September 2018, we aren't going to be able to work this issue directly. We recommend updating to the most recent version when you can, and let us know if you notice any issues with a supported version.
For now, based on the additional information you provided, we recommend making a copy of this node's data files to work off of, and make a copy of the document that is not findable by _id. Then, delete the document that is not findable by _id by using an indexed query that uniquely identifies the document, and re-insert it with a new _id.
|
1 Mongodb 3.2.3 WiredTiger
2 no sharded
3 Created time 2019-01-07 07:43:26 No maintenance, As usual
// collection: email
|
{
|
"_id" : ObjectId("5c32929e23c8f21404a6a76a"),
|
"uid" : "2720_5c0b7e0623c8f228d076c140",
|
"title" : "公会探宝BOSS奖励",
|
"getprize" : 0,
|
"content" : "恭喜你的探宝BOSS被成功击杀,这是您的奖励",
|
"ttltime" : ISODate("2019-01-07T15:43:26.192+08:00"),
|
"isread" : 0,
|
"etype" : 1,
|
"passtime" : 1548114206,
|
"prize" : [
|
{
|
"a" : "attr",
|
"t" : "rmbmoney",
|
"n" : 160
|
}
|
],
|
"ctime" : 1546818206
|
}
|
4
> db
|
zhengba_s2720
|
> db.email.getIndexes();
|
[
|
{
|
"v" : 1,
|
"key" : {
|
"_id" : 1
|
},
|
"name" : "_id_",
|
"ns" : "zhengba_s2720.email"
|
},
|
{
|
"v" : 1,
|
"key" : {
|
"uid" : 1,
|
"etype" : 1
|
},
|
"name" : "uid_1_etype_1",
|
"ns" : "zhengba_s2720.email"
|
},
|
{
|
"v" : 1,
|
"key" : {
|
"ttltime" : 1
|
},
|
"name" : "ttltime_1",
|
"ns" : "zhengba_s2720.email",
|
"expireAfterSeconds" : 1296000
|
}
|
]
|
5
> db.printReplicationInfo();
|
{ "errmsg" : "neither master/slave nor replica set replication detected" }
|
>
|
6
One can find one with _id, the second one is that we copy the first data insert.
7
I don’t know why, I don’t dare to delete it.
8
Nothing found yet
|
|
Hello,
We would like to ask for some additional information to help us narrow down possibilities and guide an investigation:
- What storage engine is the database using? (e.g., WiredTiger, MMAPv1?)
- Is this a sharded cluster and is the email collection sharded? If so, can you provide the shard key?
- This ObjectId looks to have been generated on ISODate("2019-01-06T23:43:26Z"), does that seem right? Can you provide information about any maintenance that occurred since the 6th of January? (e.g., version change, storage engine change?)
- Can you provide the full output of db.email.getIndexes()?
- Can you provide the output of db.printReplicationInfo()? The "log length start to end" number in hours will help us determine if information about what happened might still be available in the oplog. If this looks plausible we suggest taking a backup of the oplog as soon as possible, with a command like: mongodump --db local --collection "oplog.rs". If you are able to obtain this, let us know and we can provide a secure upload location.
- Does mmexport1547354844702.jpg
show two documents not returnable by _id, or is it the state after inserting a document with the same _id as one document that would not be returned?
- Have you resolved this specific issue with _id: ObjectId("5c32929e23c8f21404a6a76a") by removing a copy of the document or is the duplication still present?
- Are there other _ids with this issue, and/or are other cases of this duplication still happening?
Please also let us know if we can clarify any of our questions.
|