简体   繁体   English

如何在集群中禁用Redis复制

[英]How to disable redis replication in cluster

I have my Redis cluster set up successfully. 我的Redis集群已成功设置。

However, it seems like one or more of my slaves are always syncing from their respective master. 但是,似乎我的一个或多个从属总是从各自的主控同步。 I am always getting "LOADING Redis is loading the dataset in memory" although all the masters have finished initializing from Disk. 我总是收到“ LOADING Redis正在将数据集加载到内存中”的信息,尽管所有母版都已从磁盘完成初始化。

The cluster becomes un-usable because it's always throwing me "LOADING Redis is loading the dataset in memory". 集群变得无法使用,因为它总是让我“ LOADING Redis正在将数据集加载到内存中”。

My use case is that I will never do any writes to my Redis cluster after server restart, so there's no need to replicate to the slaves. 我的用例是服务器重启后,我将永远不会对Redis集群进行任何写操作,因此无需复制到从属服务器。

Any information would be greatly appreciated. 任何信息将不胜感激。

Thanks. 谢谢。

When a node gets stuck on LOADING Redis is loading the dataset in memory after a restart, most likely the AOF file is corrupted. 当节点卡在LOADING Redis is loading the dataset in memory重启后将LOADING Redis is loading the dataset in memory ,很可能AOF文件已损坏。

Run redis-check-aof --fix <file.aof> to fix the AOF file, then restart the redis node. 运行redis-check-aof --fix <file.aof>修复AOF文件,然后重新启动redis节点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM