解决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相关推荐

  1. linux下安装mongodb,以及解决安装报错问题

    linux下安装mongodb,以及解决安装报错问题 参考文章: (1)linux下安装mongodb,以及解决安装报错问题 (2)https://www.cnblogs.com/tongl/p/71 ...

  2. mongodb报错:Problem inserting to mongo collection: no reachable servers

    文章目录 mongodb报错:Problem inserting to mongo collection: no reachable servers mongodb报错:Problem inserti ...

  3. 解决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   笔者在使 ...

  4. 【踩坑日记】springboot项目启动报错error create bean with name

    前言 启动springboot项目报错error create bean with name xxx 以为是哪个bean没有装配上,排查了所有的bean,发现都装配了 原因分析 仔细看了报错日志,发现 ...

  5. 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). 解决办法一:保 ...

  6. 解决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 ...

  7. 解决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 ...

  8. 解决gcc报错:error: implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration]

    此文首发于我的个人博客:解决gcc报错 error implicit declaration of function 'inet_addr' [-Werror=implicit-function-de ...

  9. 解决WAS报错SRVE0207E: servlet 创建了未捕获到的初始化异常

    解决WAS报错SRVE0207E: servlet 创建了未捕获到的初始化异常 参考文章: (1)解决WAS报错SRVE0207E: servlet 创建了未捕获到的初始化异常 (2)https:// ...

最新文章

  1. hdu2236 无题II 最大匹配 + 二分搜索
  2. Cobbler部署指南之Cobbler安装操作系统篇
  3. 中科大计算机复试题目,中科大计算机复试笔试部分 09-15
  4. Redis中的Cluster总结
  5. Linux下安装Python3.6和第三方库
  6. 事务保存点savepoint
  7. 项目进度管理和项目成本管理的重点梳理
  8. Buffer与Cache
  9. 补习系列(19)-springboot JPA + PostGreSQL
  10. caffe上手:修改已训练好的网络并训练模型
  11. 用python写模拟鼠标脚本
  12. 【平面几何】点线距离与位置关系
  13. 基于服务号的微信扫码关注公众号登录网站原理分析
  14. 用户画像之ID-Mapping
  15. 先旋转x在旋转y 在旋转z_旋转Kubernetes中的秘密
  16. Java 将控制台输出打印 输出到本地文件
  17. MPB:中科院植物所杨文强组-​莱茵衣藻遗传连锁分析方法
  18. Max-Min 带宽公平分配算法
  19. 算法比较——ROC曲线和PR曲线
  20. matlab 路由表,闭关修炼之zigbee路由

热门文章

  1. 使用myeclipse打开警示牌文件出现“Failed to create the part's controls错误
  2. [附源码]计算机毕业设计Python基于Web的绿色环保网站(程序+源码+LW文档)
  3. 编译实验1--词法分析
  4. ssl证书的注册与nginx的配置
  5. 局域网内根据主机名查找ip地址
  6. Hadoop的读和写
  7. 正则表达式 密码需至少包含数字、字母、符号中的2种
  8. 微信分享(ShareSDK)个人经验总结
  9. python网络编程smtp协议发送电子邮件
  10. 块效应 振铃效应 呼吸效应