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条回答 默认 最新

  • 关注
    评论

报告相同问题?

悬赏问题

  • ¥30 STM32 INMP441无法读取数据
  • ¥100 求汇川机器人IRCB300控制器和示教器同版本升级固件文件升级包
  • ¥15 用visualstudio2022创建vue项目后无法启动
  • ¥15 x趋于0时tanx-sinx极限可以拆开算吗
  • ¥500 把面具戴到人脸上,请大家贡献智慧
  • ¥15 任意一个散点图自己下载其js脚本文件并做成独立的案例页面,不要作在线的,要离线状态。
  • ¥15 各位 帮我看看如何写代码,打出来的图形要和如下图呈现的一样,急
  • ¥30 c#打开word开启修订并实时显示批注
  • ¥15 如何解决ldsc的这条报错/index error
  • ¥15 VS2022+WDK驱动开发环境