加入收藏 | 设为首页 | 会员中心 | 我要投稿 晋中站长网 (https://www.0354zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

一文带你揭开Redis复制原理的神秘面纱

发布时间:2019-09-18 03:59:11 所属栏目:MySql教程 来源:陈龙
导读:Redis作为一个非结构化的内存数据库,在某些应用场景具备相应优势,在实际的场景设计中也得到广泛的关注和使用。但是,大部分企业的Redis数据库架构为单机运行,没有设计容灾复制,这样对于Redis的容错特性没有发挥出来,而且无持久化情况下,数据存在丢失

重启主库:

  1. 34781:M 26 Aug 2019 13:24:05.899 * DB loaded from disk: 0.000 seconds 
  2. 34781:M 26 Aug 2019 13:24:05.899 * Ready to accept connections 
  3. 34781:M 26 Aug 2019 13:24:06.544 * Replica 127.0.0.1:6380 asks for synchronization 
  4. 34781:M 26 Aug 2019 13:24:06.544 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for 'b9e0f41a523e078a6a88ae274f204777775ab4dc', my replication IDs are 'aac4a31754592820422c3ba7c8244f31c39f067f' and '0000000000000000000000000000000000000000') 
  5. 34781:M 26 Aug 2019 13:24:06.544 * Starting BGSAVE for SYNC with target: disk 
  6. 34781:M 26 Aug 2019 13:24:06.545 * Background saving started by pid 34785 
  7. 34785:C 26 Aug 2019 13:24:06.555 * DB saved on disk 
  8. 34785:C 26 Aug 2019 13:24:06.555 * RDB: 4 MB of memory used by copy-on-write 
  9. 34781:M 26 Aug 2019 13:24:06.601 * Background saving terminated with success 
  10. 34781:M 26 Aug 2019 13:24:06.602 * Synchronization with replica 127.0.0.1:6380 succeeded 
  11. 34781:M 26 Aug 2019 13:24:06.642 * Replica 127.0.0.1:6382 asks for synchronization 
  12. 34781:M 26 Aug 2019 13:24:06.642 * Partial resynchronization not accepted: Replication ID mismatch (Replica asked for 'b9e0f41a523e078a6a88ae274f204777775ab4dc', my replication IDs are 'd41f950be7593a93620b1fd872b7552668f0b355' and '0000000000000000000000000000000000000000') 
  13. 34781:M 26 Aug 2019 13:24:06.642 * Starting BGSAVE for SYNC with target: disk 
  14. 34781:M 26 Aug 2019 13:24:06.643 * Background saving started by pid 34786 
  15. 34786:C 26 Aug 2019 13:24:06.644 * DB saved on disk 
  16. 34786:C 26 Aug 2019 13:24:06.644 * RDB: 4 MB of memory used by copy-on-write 
  17. 34781:M 26 Aug 2019 13:24:06.701 * Background saving terminated with success 
  18. 34781:M 26 Aug 2019 13:24:06.701 * Synchronization with replica 127.0.0.1:6382 succeeded 

重启主数据库后,开始向两个发送同步数据,建立连接

(编辑:晋中站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读