解决MongoDB报错:Cannot create collection “None“ as a capped collection as it already exist
解决MongoDB报错:Cannot create collection "None" as a capped collection as it already exist
- Root Cause
- 解决方法
Root Cause
造成该问题主要是因为已经在使用的表在后续变更中,加入了限制文档大小或者限制文档数量的mete数据,该模型会成为Capped Collection模型,但已经存在的表并不会变更,所以用Capped Collection模型向非Capped Collection数据表中写数据,就会此报错误。
解决方法
drop旧表 create新表
如果数据仍需保留,则可以在mongo shell中采用滚动覆盖的方法更新该表.
db.<collection_name>.find().forEach(function(doc){ db.<collection_name>.insert(doc); });
解决MongoDB报错:Cannot create collection “None“ as a capped collection as it already exist相关推荐
- linux下安装mongodb,以及解决安装报错问题
linux下安装mongodb,以及解决安装报错问题 参考文章: (1)linux下安装mongodb,以及解决安装报错问题 (2)https://www.cnblogs.com/tongl/p/71 ...
- mongodb报错:Problem inserting to mongo collection: no reachable servers
文章目录 mongodb报错:Problem inserting to mongo collection: no reachable servers mongodb报错:Problem inserti ...
- 解决Hibernate报错The server time zone value is unrecognized or represents more than one time zone
解决Hibernate报错The server time zone value is unrecognized or represents more than one time zone 笔者在使 ...
- 【踩坑日记】springboot项目启动报错error create bean with name
前言 启动springboot项目报错error create bean with name xxx 以为是哪个bean没有装配上,排查了所有的bean,发现都装配了 原因分析 仔细看了报错日志,发现 ...
- git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists)....
Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保 ...
- 解决Redis报错:MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist
解决Redis报错:MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on ...
- 解决Python报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 658: illegal multibyte
解决Python报错–UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 658: illegal multibyte ...
- 解决gcc报错:error: implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration]
此文首发于我的个人博客:解决gcc报错 error implicit declaration of function 'inet_addr' [-Werror=implicit-function-de ...
- 解决WAS报错SRVE0207E: servlet 创建了未捕获到的初始化异常
解决WAS报错SRVE0207E: servlet 创建了未捕获到的初始化异常 参考文章: (1)解决WAS报错SRVE0207E: servlet 创建了未捕获到的初始化异常 (2)https:// ...
最新文章
- hdu2236 无题II 最大匹配 + 二分搜索
- Cobbler部署指南之Cobbler安装操作系统篇
- 中科大计算机复试题目,中科大计算机复试笔试部分 09-15
- Redis中的Cluster总结
- Linux下安装Python3.6和第三方库
- 事务保存点savepoint
- 项目进度管理和项目成本管理的重点梳理
- Buffer与Cache
- 补习系列(19)-springboot JPA + PostGreSQL
- caffe上手:修改已训练好的网络并训练模型
- 用python写模拟鼠标脚本
- 【平面几何】点线距离与位置关系
- 基于服务号的微信扫码关注公众号登录网站原理分析
- 用户画像之ID-Mapping
- 先旋转x在旋转y 在旋转z_旋转Kubernetes中的秘密
- Java 将控制台输出打印 输出到本地文件
- MPB:中科院植物所杨文强组-​莱茵衣藻遗传连锁分析方法
- Max-Min 带宽公平分配算法
- 算法比较——ROC曲线和PR曲线
- matlab 路由表,闭关修炼之zigbee路由