Mongodb 重要点
2016-03-25 12:06
375 查看
不支持事务,在单文档记录上原子操作而已。
有个$isolation 只能保证多个文档更新直到最后才让其它客户端看到,但可能部分成功,且不能用于sharding cluster
默认隔离级别是read uncommitted(durable 之前)。。。
副本模式的一致性: 3.2版本开始有读多数和多主的选项来保证
journal 预先记录日志,也是采用内存。journal刷到磁盘的间隔是可配的,尽量配在与数据磁盘不同的磁盘
写的时候
可以指定参数 副本确认数或者majority,以及journal 是否为true
Changed in version 3.2: For replica sets using protocolVersion: 1 and running with the journalenabled:
w: "majority" implies j: true.
Secondary members acknowledge replicated write operations after the secondary members have written to their respective on-disk journals, regardless of the j option used for the write on the primary.
读的时候
MongoDB 3.2 introduces the readConcern query option for replica sets and replica set shards. By default, MongoDB uses a read concern of "local" to return the most recent data available to the MongoDB instance at the time of the query, even if the data has not been persisted to a majority of replica set members and may be rolled back.
有个$isolation 只能保证多个文档更新直到最后才让其它客户端看到,但可能部分成功,且不能用于sharding cluster
默认隔离级别是read uncommitted(durable 之前)。。。
副本模式的一致性: 3.2版本开始有读多数和多主的选项来保证
journal 预先记录日志,也是采用内存。journal刷到磁盘的间隔是可配的,尽量配在与数据磁盘不同的磁盘
写的时候
可以指定参数 副本确认数或者majority,以及journal 是否为true
Changed in version 3.2: For replica sets using protocolVersion: 1 and running with the journalenabled:
w: "majority" implies j: true.
Secondary members acknowledge replicated write operations after the secondary members have written to their respective on-disk journals, regardless of the j option used for the write on the primary.
读的时候
MongoDB 3.2 introduces the readConcern query option for replica sets and replica set shards. By default, MongoDB uses a read concern of "local" to return the most recent data available to the MongoDB instance at the time of the query, even if the data has not been persisted to a majority of replica set members and may be rolled back.
相关文章推荐
- Linux下简单安装MongoDB
- Mongodb的安装与启动
- MongoDB 数据库安装
- Mongodb备份(mongodump)和恢复(mongorestore)
- MongoDB Node.js driver
- MongoDB基本使用
- MongoDB 2.6.x 的安装部署
- mongodb mongotemplate聚合
- 【MongoDb】
- MongoDB 安装与启动
- MongoDB中的分组
- 放养的小爬虫--豆瓣电影入门级爬虫(mongodb使用教程~)
- MongoDB分片测试
- MongoDB数据库命令总结
- ES-MongoDB学习3_MongoDB数据同步到Elasticsearch中
- Mongodb 设置过期时间Expire Date
- MongoDB基本命令用
- MongoDB与PostgresQL无责任初步测试
- Linux mongodb安装、启动、运行
- MONGODB用户、角色和权限管理