mongo findandmodify
2017-12-07 12:18
281 查看
mongodb 提供了一种原子性的操作,findandmodify,但它只满足原子性,不具备事务的特性,事务具有四种特性:原子性,隔离性,一致性,持久性。findAndModify在高并发下有可能会出现以下情况,比如有两个线程t1 t2:
t1读,t2读,t1写,t2写 这个时候有可能两个线程return的结果都是原来库里边的值,而不是更新所期望的 t2会获取到t1插入到数据库里的值,这点在高并发的时候一定要注意。
t1读,t2读,t1写,t2写 这个时候有可能两个线程return的结果都是原来库里边的值,而不是更新所期望的 t2会获取到t1插入到数据库里的值,这点在高并发的时候一定要注意。
相关文章推荐
- mongo简介——update & findAndModify
- mongoclient findandmodify使用
- C# Collection.FindAndModify 方法 使用
- python中设置mongo的id为自增(find_and_modify函数)
- mongodb,update和 findAndModify操作。
- mongodb-findAndModify(来源于mongodb权威指南)
- findAndModify与update更新的使用
- 使用mongodb的findAndModify命令来进行数据同步
- mongodb 原子操作findAndModify
- 误操作Ghost整个硬盘,FindAndMount & DiskGenius解决方案
- Unable to find the report in the manifest resources. Please build the project, and try again.
- Bash String Manipulation Examples – Length, Substring, Find and Replace--reference
- mongo查询过滤条件java实例($and,$or,$eq,$ne)
- Find User-exit and BADIs
- mongo查询过滤条件java实例($and,$or,$eq,$ne)
- 【MongoDB】mongodump and mongorestore of mogodb
- Find and counter
- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disa
- 学习mongo系列(五) AND,$or,$type
- Geeks Union-Find Algorithm Union By Rank and Path Compression 图环算法