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”;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM