我有一个副本集,想要将MongoDB从版本2.4.5升级到2.6.1,在替换二进制文件之前使用此命令:db.upgradeCheckAllDBs()
然而,此错误返回:
...
Checking collection local.replset.minvalid
Document Error: document is no longer valid in 2.6 because DollarPrefixedFieldName: $set is not valid for storage.: { "_id" : ObjectId("50101a875b51c70037b81c30"), "ts" : Timestamp(1398232884, 51), "h"
: NumberLong("4590312020654652586"), "op" : "u", "ns" : "jumbo.jumboFile2Upload", "o2" : { "_id" : ObjectId("510b039031c82133929bd77f") }, "o" : { "$set" : { "operation" : { "operation" : "upload
", "total" : NumberLong(1048768), "done" : NumberLong(671576) } } } }
...
To fix the problems above please consult http://dochub.mongodb.org/core/upgrade_checker_help
false
此错误发生在内部MongoDB集合(local.replset.minvalid
)中。提到link州:
要解决此问题,请删除该文档并使用相应的内容重新插入 校正。
这local.replset.minvalid
做了什么?我觉得更新内部MongoDB集合感觉不太舒服。
此集合local.replset.minvalid
仅包含一个文档:
set0:PRIMARY> db.replset.minvalid.findOne()
{
"_id" : ObjectId("50101a875b51c70037b81c30"),
"ts" : Timestamp(1398232884, 51),
"h" : NumberLong("4590312020654652586"),
"op" : "u",
"ns" : "jumbo.jumboFile2Upload",
"o2" : {
"_id" : ObjectId("510b039031c82133929bd77f")
},
"o" : {
"$set" : {
"operation" : {
"operation" : "upload",
"total" : NumberLong(1048768),
"done" : NumberLong(671576)
}
}
}
}
有什么建议吗?