mongos删除库表的一个bug
来源:互联网 发布:广数928外螺纹编程实例 编辑:程序博客网 时间:2024/05/09 15:19
ISSUE SUMMARY
When dropping a database / collection in a sharded cluster, even if the drop is reported as successful it is possible the database / collection may still be present in some nodes in the cluster. At this time, we do not recommend that users drop a database or collection and then attempt to reuse the namespace.
USER IMPACT
When the database/collection is not successfully dropped in a given node, the corresponding files continue to use disk space in that node. Attempting to reuse the namespace may lead to undefined behavior.
WORKAROUNDS
To work around this issue one can follow the steps below to drop a database/collection in a sharded environment:
- Drop the database / collection using a mongos
- Connect to each shard's primary and verify the namespace has been dropped. If it has not, please drop it. Dropping a database (e.g db.dropDatabase()) removes the data files on disk for the database being dropped.
- Connect to a mongos, switch to the config database and remove any reference to the removed namespace from the collections chunks, locks, databases and collections:
When dropping a database:
use config
db.collections.remove( { _id: /^DATABASE\./ } )
db.databases.remove( { _id: "DATABASE" } )
db.chunks.remove( { ns: /^DATABASE\./ } )
db.locks.remove( { _id: /^DATABASE\./ } )
When dropping a collection:
use config
db.collections.remove( { _id: "DATABASE.COLLECTION" } )
db.chunks.remove( { ns: "DATABASE.COLLECTION" } )
db.locks.remove( { _id: "DATABASE.COLLECTION" } )
- Connect to each mongos and run flushRouterConfig
PS:也遭遇了,真坑,原文链接https://jira.mongodb.org/browse/SERVER-17397
- mongos删除库表的一个bug
- 一个常见的删除数组元素的bug
- 解决Windows7的一个bug,无法删除的文件
- mongos的Java端操作
- 记一个SwipeMenuListView侧滑删除错乱的Bug
- .net库的一个bug?
- Jsoncpp库的一个bug
- MotionWelder的Cocos2d库的一个bug
- log4cpp库的一个timestamp的bug
- WOW服务器代码(mongos)库 FOR svn
- 微软的一个bug?
- OracleParameter 的一个bug
- FireFox的一个bug
- 微软的一个BUG
- Tencent 的一个Bug
- 一个ComboBox的Bug
- WindowsXP的一个Bug
- QQ的一个BUG
- Transform的坐标变换注意事项
- iOS App 上线发布流程
- 记一次keepalived脑裂问题查找
- java正则表达式
- adnroid处理在富文本框拿数据中出现的html5的东西
- mongos删除库表的一个bug
- IntelliJ IDEA单元测试+SpringMvc单元测试
- Unity里的坐标转换+动态载入
- MongoDB集群监控
- HRBUST1213 单词接龙
- idea14 添加工具栏,例如后退,前进,idea14后退按钮不显示
- ArcGIS 10.2以上GP服务调用
- 性能优化,进无止境-内存篇(上)
- 游戏API接口本身的意义是什么