zxb_lxy 2020-07-16 18:19 采纳率: 0%
浏览 188

redis 5.0.8 版本开启aof持久化不能使用psync2,导致从节点重启都要全量同步

各位大佬好,安装的redis版本为5.0.8 ,在测试rdb+aof混合模式下从节点重启是否可以部分同步时,发现只要开启了aof持久化模式,从节点重启还是全量同步,是因为psync2保存的复制id与复制偏移量只保存在rdb文件里的原因吗,如果是这样那是不是开启了aof就不能使用psync2的特性了?,烦请各位指教
参数配置如下:

rdbcompression yes
rdbchecksum yes
dbfilename "dump_6912.rdb"
dir "/redis/redis6912/db"

appendonly yes
appendfilename "appendonly_6912.aof"
appendfsync everysec
no-appendfsync-on-rewrite yes
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes

aof-use-rdb-preamble yes

replicaof 10.xxx.xxx.xxx 6912

日志:


321268:S 16 Jul 2020 18:07:06.662 # User requested shutdown...
321268:S 16 Jul 2020 18:07:06.662 * Saving the final RDB snapshot before exiting.
321268:S 16 Jul 2020 18:07:06.663 * DB saved on disk
321268:S 16 Jul 2020 18:07:06.664 * Removing the pid file.
321268:S 16 Jul 2020 18:07:06.664 # Redis is now ready to exit, bye bye...
322410:C 16 Jul 2020 18:07:10.443 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
322410:C 16 Jul 2020 18:07:10.443 # Redis version=5.0.8, bits=64, commit=00000000, modified=0, pid=322410, just started
322410:C 16 Jul 2020 18:07:10.443 # Configuration loaded
322411:S 16 Jul 2020 18:07:10.448 * Running mode=standalone, port=6912.
322411:S 16 Jul 2020 18:07:10.448 # Server initialized
322411:S 16 Jul 2020 18:07:10.448 * Ready to accept connections
322411:S 16 Jul 2020 18:07:10.449 * Connecting to MASTER 10.168.80.157:6912
322411:S 16 Jul 2020 18:07:10.449 * MASTER <-> REPLICA sync started
322411:S 16 Jul 2020 18:07:10.449 * Non blocking connect for SYNC fired the event.
322411:S 16 Jul 2020 18:07:10.450 * Master replied to PING, replication can continue...
322411:S 16 Jul 2020 18:07:10.450 * Partial resynchronization not possible (no cached master)
322411:S 16 Jul 2020 18:07:10.451 * Full resync from master: 205c2e06ceec150f41be134dcb4b8eab5ee32938:354815
322411:S 16 Jul 2020 18:07:10.491 * MASTER <-> REPLICA sync: receiving 210 bytes from master
322411:S 16 Jul 2020 18:07:10.491 * MASTER <-> REPLICA sync: Flushing old data
322411:S 16 Jul 2020 18:07:10.492 * MASTER <-> REPLICA sync: Loading DB in memory
322411:S 16 Jul 2020 18:07:10.492 * MASTER <-> REPLICA sync: Finished with success
322411:S 16 Jul 2020 18:07:10.493 * Background append only file rewriting started by pid 322424
322411:S 16 Jul 2020 18:07:10.529 * AOF rewrite child asks to stop sending diffs.
322424:C 16 Jul 2020 18:07:10.529 * Parent agreed to stop sending diffs. Finalizing AOF...
322424:C 16 Jul 2020 18:07:10.529 * Concatenating 0.00 MB of AOF diff received from parent.
322424:C 16 Jul 2020 18:07:10.529 * SYNC append only file rewrite performed
322424:C 16 Jul 2020 18:07:10.530 * AOF rewrite: 0 MB of memory used by copy-on-write
322411:S 16 Jul 2020 18:07:10.549 * Background AOF rewrite terminated with success
322411:S 16 Jul 2020 18:07:10.549 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
322411:S 16 Jul 2020 18:07:10.549 * Background AOF rewrite finished successfully
322411:S 16 Jul 2020 18:08:10.885 * Background append only file rewriting started by pid 323369
322411:S 16 Jul 2020 18:08:10.908 * AOF rewrite child asks to stop sending diffs.
323369:C 16 Jul 2020 18:08:10.908 * Parent agreed to stop sending diffs. Finalizing AOF...
323369:C 16 Jul 2020 18:08:10.908 * Concatenating 0.00 MB of AOF diff received from parent.
323369:C 16 Jul 2020 18:08:10.908 * SYNC append only file rewrite performed
323369:C 16 Jul 2020 18:08:10.909 * AOF rewrite: 0 MB of memory used by copy-on-write
322411:S 16 Jul 2020 18:08:10.986 * Background AOF rewrite terminated with success
322411:S 16 Jul 2020 18:08:10.986 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
322411:S 16 Jul 2020 18:08:10.986 * Background AOF rewrite finished successfully
  • 写回答

1条回答 默认 最新

  • 关注
    评论

报告相同问题?

悬赏问题

  • ¥300 寻抓云闪付tn组成网页付款链接
  • ¥15 请问Ubuntu要怎么安装chrome呀?
  • ¥15 视频编码 十六进制问题
  • ¥15 Xsheii7我安装这个文件的时候跳出来另一个文件已锁定文件的无一部分进程无法访问。这个该怎么解决
  • ¥15 unity terrain打包后地形错位,跟建筑不在同一个位置,怎么办
  • ¥15 FileNotFoundError 解决方案
  • ¥15 uniapp实现如下图的图表功能
  • ¥15 u-subsection如何修改相邻两个节点样式
  • ¥30 vs2010开发 WFP(windows filtering platform)
  • ¥15 服务端控制goose报文控制块的发布问题