PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > 数据库 > NoSql数据库 > 正文

    mongodb 错误src/mongo/db/query/plan_enumerator.cpp的修复

    作者:admin来源:csdn浏览:时间:2020-10-04 21:56:09我要评论
    导读:db["xxxx"].find({"createdAt": {"$gte": "2019-04-23T00:00:00+08:00","$lte": "2019-04-23T23:59:59+08:00"}})
    mongodb 3.2的库执行下面的查询就报错:

    db["xxxx"].find({"createdAt": {"$gte": "2019-04-23T00:00:00+08:00","$lte": "2019-04-23T23:59:59+08:00"}})

    mongodb 错误src/mongo/db/query/plan_enumerator.cpp的修复

    经测试,只要是查询带createdAt这个字段的,就报这个错误,猜测是createdAt有数据损坏了。


    解决方案,用mongoexport和mongoimport 把数据导出再导入,问题解决。

    注意,经过实验用mongodump和mongorestore这种方式是修复不了数据损坏,估计是mongorestore的方式是连原来的元数据都导入进去了,而mongoimport是重建了元数据。
    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-154-6340-1.html
    相关热词搜索: mongodb