Skip to content

fix(sync): 适配 rdb-only 复制请求#1052

Merged
suxb201 merged 4 commits into
tair-opensource:v4from
DCjanus:sync-rdb-only
May 19, 2026
Merged

fix(sync): 适配 rdb-only 复制请求#1052
suxb201 merged 4 commits into
tair-opensource:v4from
DCjanus:sync-rdb-only

Conversation

@DCjanus
Copy link
Copy Markdown
Contributor

@DCjanus DCjanus commented May 18, 2026

背景

  • fix(sync): 避免 sync_aof=false 时缓存增量流 #1050 合并后遗留了 sync_aof=false 场景下适配高版本 Redis rdb-only 复制请求的 TODO。
  • 当前 RedisShake 在只需要 RDB 时仍会按普通 PSYNC 进入完整复制流程;对支持 rdb-only 的 source,可以显式请求只发送 RDB,避免进入后续 AOF 增量阶段。

改动

  • sync_reader.sync_aof=false 且走 PSYNC 时,先发送 REPLCONF rdb-only 1
  • source 不支持该能力时只记录 info,并保持原有同步行为;连接或协议读取错误仍按现有 reader 逻辑中止。
  • tests/cases/sync_aof_false.py 中补充端到端断言,覆盖 Redis / Valkey 版本差异下的支持与不支持路径。

验证

DCjanus added 2 commits May 18, 2026 20:39
@DCjanus DCjanus marked this pull request as ready for review May 18, 2026 12:57
Comment thread internal/reader/sync_standalone_reader.go Outdated
@DCjanus DCjanus marked this pull request as draft May 19, 2026 01:46
@DCjanus DCjanus marked this pull request as ready for review May 19, 2026 02:01
@suxb201 suxb201 merged commit 5f47969 into tair-opensource:v4 May 19, 2026
10 checks passed
@DCjanus DCjanus deleted the sync-rdb-only branch May 19, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants