Redis碎碎念

1. 添加slave时的主从日志

slave的日志

64798:S 12 Jan 13:24:22.483 * SLAVE OF 127.0.0.1:6379 enabled (user request from 'id=2 addr=127.0.0.1:51366 fd=6 name= age=864 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=slaveof')
64798:S 12 Jan 13:24:23.421 * Connecting to MASTER 127.0.0.1:6379
64798:S 12 Jan 13:24:23.422 * MASTER <-> SLAVE sync started
64798:S 12 Jan 13:24:23.422 * Non blocking connect for SYNC fired the event.
64798:S 12 Jan 13:24:23.422 * Master replied to PING, replication can continue...
64798:S 12 Jan 13:24:23.423 * Partial resynchronization not possible (no cached master)
64798:S 12 Jan 13:24:23.426 * Full resync from master: b6c0d819dc23ff2148ece7042b54cd3ede547dc9:71
64798:S 12 Jan 13:24:24.724 * MASTER <-> SLAVE sync: receiving 74144808 bytes from master
64798:S 12 Jan 13:24:25.059 * MASTER <-> SLAVE sync: Flushing old data
64798:S 12 Jan 13:24:25.870 * MASTER <-> SLAVE sync: Loading DB in memory
64798:S 12 Jan 13:24:27.562 * MASTER <-> SLAVE sync: Finished with success

 

master的日志

64796:M 12 Jan 13:24:23.423 * Slave 127.0.0.1:6380 asks for synchronization
64796:M 12 Jan 13:24:23.423 * Full resync requested by slave 127.0.0.1:6380
64796:M 12 Jan 13:24:23.423 * Starting BGSAVE for SYNC with target: disk
64796:M 12 Jan 13:24:23.425 * Background saving started by pid 65161
65161:C 12 Jan 13:24:24.642 * DB saved on disk
65161:C 12 Jan 13:24:24.645 * RDB: 0 MB of memory used by copy-on-write
64796:M 12 Jan 13:24:24.723 * Background saving terminated with success
64796:M 12 Jan 13:24:25.064 * Synchronization with slave 127.0.0.1:6380 succeeded

 

2. 安装redis-migrate-tool依赖包

yum install autoconf automake libtool bzip2 

 

3. 编译过程中报错

zmalloc.h:50:10: fatal error: jemalloc/jemalloc.h: No such file or directory
 #include <jemalloc/jemalloc.h>
          ^~~~~~~~~~~~~~~~~~~~~

解决方法:

make distclean

 

posted @ 2016-04-29 10:37  iVictor  阅读(584)  评论(0编辑  收藏  举报