MongoDB:The Definitive Guide 2nd笔记之Seeing the Current Operations
2016-09-25 08:40
281 查看
查看当前操作
过滤查看
杀死操作,不是所有的操作都可以被杀死,**operations can only be killed when they
yield, so updates, finds, and removes can all be killed**
**replication thread (which will continue fetch‐
ing more operations from the sync source for as long as possible) and the writeback listener for sharding.**
上面这两种操作被杀死后MongoDB会重新启动它们,但是杀死replication thread会停止复制操作,杀死writeback listener会使
幽灵写入
组织幽灵写入的最好方法就是采用确认写入的方式:直到上一个写入已经完成再进行下一次的写入,而不是上一次写入的数据停留在数据服务器的缓冲区时就开始下一次写入。
db.currentOp()
过滤查看
db.currentOp({"ns" : "prod.users"})
杀死操作,不是所有的操作都可以被杀死,**operations can only be killed when they
yield, so updates, finds, and removes can all be killed**
db.killOp(123)
**replication thread (which will continue fetch‐
ing more operations from the sync source for as long as possible) and the writeback listener for sharding.**
上面这两种操作被杀死后MongoDB会重新启动它们,但是杀死replication thread会停止复制操作,杀死writeback listener会使
mongos错过一些重要的写入错误。
幽灵写入
组织幽灵写入的最好方法就是采用确认写入的方式:直到上一个写入已经完成再进行下一次的写入,而不是上一次写入的数据停留在数据服务器的缓冲区时就开始下一次写入。
相关文章推荐
- MySQL与MongoDB的操作对比,以及区别
- MongoDB配置mongo.cfg快速启动
- MongoDB的地埋空间数据存储、空间索引以及空间查询
- ShapeFile数据到mongodb的导入
- mongodb安装、配置与简单操作
- MongoDB分片
- MongoDB如何确保一致性
- MongoDB如何确保高可用
- MongoDB启动时出现errno:111 Connection refused错误的解决
- mongodb 修改用户密码 2种方法
- MongoDB支持事务吗
- 数据怎么存入MongoDB
- 什么情况下用MongoDB
- MongoDB基本命令
- 使用java操作MongoDB
- MongoDB整合Spring详细讲解
- mongoDB 3.0 安全权限访问控制
- yum mongodb 扩展安装
- node 通过mongoose实现 mongodb的增删改
- 用MongoDB分析合肥餐饮业