redis - 如何在 Redis v2.4.6 中使 Redis slave 只读?
问题描述
redis.conf
我在文件中使用了 slave-read-only yes 。
CONFIG SET "slave-read-only" "yes"
(error) ERR Unsupported CONFIG parameter: slave-read-only
怎么设置一样?
解决方案
从Redis 文档:
从 Redis 2.6 开始,slave 支持默认启用的只读模式。此行为由
slave-read-only
redis.conf 文件中的选项控制,并且可以在运行时使用 CONFIG SET 启用和禁用。
对于任何早于 2.6 的 Redis 版本,slave-read-only
参数不可用(因此无法识别)。因此,在 Redis v2.4.6 中,您将无法设置该参数。
推荐阅读
- c# - 在类中填充列表
- machine-learning - 使用 DVC 和 Pachyderm 的优缺点是什么?
- java - 在 Cloud Foundry 中部署时 Jvm 字节码验证失败,但是当使用码头部署在本地时,代码运行良好
- scrollview - 在 SwiftUI 中,滚动视图内部 UI 视图的阴影会被滚动视图的大小截断吗?
- php - 在 PHP 中解析 ini 文件时出现语法错误
- pandas - pandas 将一个有效信号向量化为 5 行
- javascript - 改进 js 作用域的最佳方法
- pdf - € 符号会产生较大的 PDF 文件大小 (+70kb)
- svelte - Svelte awaited block 如何修改 promise 的数组值?
- reactjs - 仅当两个依赖项都更改时才运行效果挂钩