作者热门文章
- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我尝试查找有关自定义 AOF 配置的信息。我找到了 only that :
There are three options:
- fsync every time a new command is appended to the AOF. Very very slow, very safe.
- fsync every second. Fast enough (in 2.4 likely to be as fast as snapshotting), and you can lose 1 second of data if there is a disaster.
- Never fsync, just put your data in the hands of the Operating System. The faster and less safe method.
我可以配置 fsync 每次只为特定命令(INCR)将命令附加到 AOF 吗?可能吗?
最佳答案
您可以使用 MULTI/EXEC block 来做到这一点,即:
MULTI
CONFIG SET appendfsync always
INCR somekey
CONFIG SET appendfsync no
EXEC
关于redis - 如何在redis中为特定命令配置fsync,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33733533/
我是一名优秀的程序员,十分优秀!