mongodb重启引起数据丢失 续 MongoDBLinuxBlog
程序员文章站
2024-03-15 13:36:05
...
今天看到官方Blog的一篇文章,http://blog.mongodb.org/post/248614779/fast-updates-with-mongodb-update-in-place
上面写道:MongoDB disk writes are lazy. If we receive 1,000 increments in one second for the object, it will only be written once. Physical writes occur a couple of seconds after the operation.
以此可知,当1秒钟后写入第二次时,mongodb必定会物理写入磁盘,改方法已经测试通过。
linux下测试结果:一定时间之后会自动写入数据到磁盘。
上面写道:MongoDB disk writes are lazy. If we receive 1,000 increments in one second for the object, it will only be written once. Physical writes occur a couple of seconds after the operation.
以此可知,当1秒钟后写入第二次时,mongodb必定会物理写入磁盘,改方法已经测试通过。
linux下测试结果:一定时间之后会自动写入数据到磁盘。