zoukankan      html  css  js  c++  java
  • redis配置文件中slave-serve-stale-data的解释

    redis.conf文件中可以看到slave-serve-stale-data这个参数,作用是什么?

    原文解释:

    # When a slave loses its connection with the master, or when the replication
    # is still in progress, the slave can act in two different ways:
    #
    # 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
    #    still reply to client requests, possibly with out of date data, or the
    #    data set may just be empty if this is the first synchronization.
    #
    # 2) if slave-serve-stale-data is set to 'no' the slave will reply with
    #    an error "SYNC with master in progress" to all the kind of commands
    #    but to INFO and SLAVEOF.
    #
    slave-serve-stale-data yes

    slave-serve-stale-data参数设置成yes,主从复制中,从服务器可以响应客户端请求;

    slave-serve-stale-data参数设置成no,主从复制中,从服务器将阻塞所有请求,有客户端请求时返回“SYNC with master in progress”;

  • 相关阅读:
    Alpha 冲刺 (7/10)
    Alpha 冲刺 (6/10)
    同学录
    Alpha 冲刺 (5/10)
    Letcode刷题总结知识点
    python 基础语法
    Python 文件读写与编码解读
    py2exe界面和程序开发打包
    求职者五险一金解读
    互联网企业程序题总结
  • 原文地址:https://www.cnblogs.com/coder306/p/13087610.html
Copyright © 2011-2022 走看看