Redis从节点和主节点中key的数量不同是为什么
来源:互联网 发布:邓紫棋怎么不火了知乎 编辑:程序博客网 时间:2024/05/16 10:39
原文地址:http://redis.io/topics/faq
My slave claims to have a different number of keys compared to its master, why?
If you use keys with limited time to live (Redis expires) this is normal behavior. This is what happens:
- The master generates an RDB file on the first synchronization with the slave.
- The RDB file will not include keys already expired in the master, but that are still in memory.
- However these keys are still in the memory of the Redis master, even if logically expired. They'll not be considered as existing, but the memory will be reclaimed later, both incrementally and explicitly on access. However while these keys are not logical part of the dataset, they are advertised in INFO output and by the DBSIZE command.
- When the slave reads the RDB file generated by the master, this set of keys will not be loaded.
As a result of this, it is common for users with many keys with an expire set to see less keys in the slaves, because of this artifact, but there is no actual logical difference in the instances content.
0 0
- Redis从节点和主节点中key的数量不同是为什么
- redis集群动态添加主节点和从节点
- redis集群动态添加主节点和从节点
- Zookeeper节点数量为什么建议是奇数个
- 二叉树二度节点和叶子节点的数量关系
- 给定一棵二叉树,找到它的最小深度。最小深度是从根节点到最近叶节点的最短路径上的节点数量
- 二叉树节点推导既二度节点和叶子节点的数量关系
- 统计 DOM 节点下子节点的数量
- Maven中节点和节点的区别
- Spring 配置redis的单节点和集群节点
- 从dts中获取节点和属性的实例二
- 为什么zookeeper集群中节点配置个数是奇数个?
- redis的集群,添加和删除节点
- Flex中如何利用isBranch()事件,检测Tree的节点是支节点还是叶子节点
- 为什么指向的是最后一个节点的下一个节点 http://www.zhihu.com/question/20638791
- 获取MainFest中MetaData对应的key节点数据
- Maven中dependencies节点和dependencyManagement节点的区别
- Maven中<dependencies>节点和<dependencyManagement>节点的区别
- python 实现多变量核密度评估函数
- ORA-14411
- 柬埔寨外资准入法律及政策简介
- 指数分布
- blkid反馈的uuid和mdadm.conf文件中记录的uuid 的值不一样
- Redis从节点和主节点中key的数量不同是为什么
- 计算机:百度网盘分享链接失效的解决方法
- BufferedReader
- xiaoxin juju needs help(逆元)
- 关于java中的中文字符占几个字节
- 缅甸投资环境及法律政策简介
- android studio 2.2 ndk 简例
- jQuery选择器中,通配符[id^='code']input[id$='code'][id*='code']
- LeetCode-------24. Swap Nodes in Pairs(两两交换)