设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 创业者 数据 手机
当前位置: 首页 > 站长学院 > MySql教程 > 正文

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

发布时间:2019-09-17 08:52 所属栏目:115 来源:陈龙
导读:启动新从库 [redis@albertsrc]$./redis-serverredis.conf6382 33744:C26Aug201912:03:17.731#oO0OoO0OoO0OoRedisisstartingoO0OoO0OoO0Oo 33744:C26Aug201912:03:17.731#Redisversion=5.0.4,bits=64,commit=0000000

启动新从库

  1. [redis@albert src]$ ./redis-server redis.conf6382 
  2. 33744:C 26 Aug 2019 12:03:17.731 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 
  3. 33744:C 26 Aug 2019 12:03:17.731 # Redis version=5.0.4, bits=64, commit=00000000, modified=0, pid=33744, just started 
  4. 33744:C 26 Aug 2019 12:03:17.731 # Configuration loaded 
  5.                 _._                                                  
  6.            _.-``__ ''-._                                             
  7.       _.-``    `.  `_.  ''-._           Redis 5.0.4 (00000000/0) 64 bit 
  8.   .-`` .-```.  ```\/    _.,_ ''-._                                    
  9.  (    '      ,       .-`  | `,    )     Running in standalone mode 
  10.  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6382 
  11.  |    `-._   `._    /     _.-'    |     PID: 33744 
  12.   `-._    `-._  `-./  _.-'    _.-'                                    
  13.  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
  14.  |    `-._`-._        _.-'_.-'    |           http://redis.io        
  15.   `-._    `-._`-.__.-'_.-'    _.-'                                   
  16.  |`-._`-._    `-.__.-'    _.-'_.-'|                                   
  17.  |    `-._`-._        _.-'_.-'    |                                  
  18.   `-._    `-._`-.__.-'_.-'    _.-'                                   
  19.       `-._    `-.__.-'    _.-'                                       
  20.           `-._        _.-'                                           
  21.               `-.__.-'                                               
  22.   
  23. 33744:S 26 Aug 2019 12:03:17.734 # Server initialized 
  24. 33744:S 26 Aug 2019 12:03:17.734 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 
  25. 33744:S 26 Aug 2019 12:03:17.734 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 
  26. 33744:S 26 Aug 2019 12:03:17.734 * DB loaded from disk: 0.000 seconds 
  27. 33744:S 26 Aug 2019 12:03:17.734 * Before turning into a replica, using my master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer. 
  28. 33744:S 26 Aug 2019 12:03:17.734 * Ready to accept connections 
  29. 33744:S 26 Aug 2019 12:03:17.735 * Connecting to MASTER 127.0.0.1:6379 
  30. 33744:S 26 Aug 2019 12:03:17.735 * MASTER <-> REPLICA sync started 
  31. 33744:S 26 Aug 2019 12:03:17.735 * Non blocking connect for SYNC fired the event. 
  32. 33744:S 26 Aug 2019 12:03:17.735 * Master replied to PING, replication can continue... 
  33. 33744:S 26 Aug 2019 12:03:17.736 * Trying a partial resynchronization (request b9e0f41a523e078a6a88ae274f204777775ab4dc:1). 
  34. 33744:S 26 Aug 2019 12:03:17.736 * Successful partial resynchronization with master. 
  35. 33744:S 26 Aug 2019 12:03:17.736 * MASTER <-> REPLICA sync: Master accepted a Partial Resynchronization. 

2. 场景一:主库关机

(编辑:ASP站长网)

网友评论
推荐文章
    热点阅读