RedisShake icon indicating copy to clipboard operation
RedisShake copied to clipboard

ERR unknown rdb value type byte

Open buzhidaojiaoshaming opened this issue 10 months ago • 6 comments

问题描述(Issue Description)

基于cluster之间的同步 sync过中提示 ERR unknown rdb value type byte. key=[�E], type=[244] RedisShake/internal/rdb/types/interface.go:100 -> ParseObject() RedisShake/internal/rdb/rdb.go:191 -> (*Loader).parseRDBEntry() RedisShake/internal/rdb/rdb.go:101 -> (*Loader).ParseRDB() RedisShake/internal/reader/sync_standalone_reader.go:437 -> (*syncStandaloneReader).sendRDB() RedisShake/internal/reader/sync_standalone_reader.go:136 -> (*syncStandaloneReader).StartRead.func1() runtime/asm_amd64.s:1650 -> goexit()

环境信息(Environment)

  • RedisShake 版本(RedisShake Version):4.2.2
  • Redis 源端版本(Redis Source Version):7.4.1
  • Redis 目的端版本(Redis Destination Version):7.4.1
  • Redis 部署方式(standalone/cluster/sentinel):cluster
  • 是否在云服务商实例上部署(Deployed on Cloud Provider):否

日志信息(Logs)

{"level":"info","time":"2025-02-13T19:15:44+08:00","message":"redisClusterWriter connected to redis cluster successful. addresses=[ip:5012 ip:5012 :5013 ip:5013 :5012]"} {"level":"info","time":"2025-02-13T19:15:44+08:00","message":"create RedisClusterWriter: ip:5012"} {"level":"info","time":"2025-02-13T19:15:44+08:00","message":"start syncing..."} {"level":"info","time":"2025-02-13T19:15:44+08:00","message":"[reader_ 5012] source db is not doing bgsave! continue."} {"level":"info","time":"2025-02-13T19:15:44+08:00","message":"[reader 5013] source db is not doing bgsave! continue."} {"level":"info","time":"2025-02-13T19:15:44+08:00","message":"[reader 5013] source db is not doing bgsave! continue."} {"level":"info","time":"2025-02-13T19:15:44+08:00","message":"[reader 5012] source db is not doing bgsave! continue."} {"level":"info","time":"2025-02-13T19:15:44+08:00","message":"[reader _5016] source db is not doing bgsave! continue."} {"level":"error","time":"2025-02-13T19:15:44+08:00","message":"unknown rdb value type byte. key=[\u0002\u0000\ufffdE], type=[244]\n\t\t\tRedisShake/internal/rdb/types/interface.go:100 -> ParseObject()\n\t\t\tRedisShake/internal/rdb/rdb.go:191 -> (*Loader).parseRDBEntry()\n\t\t\tRedisShake/internal/rdb/rdb.go:101 -> (*Loader).ParseRDB()\n\t\t\tRedisShake/internal/reader/sync_standalone_reader.go:437 -> (*syncStandaloneReader).sendRDB()\n\t\t\tRedisShake/internal/reader/sync_standalone_reader.go:136 -> (*syncStandaloneReader).StartRead.func1()\n\t\t\truntime/asm_amd64.s:1650 -> goexit()"}

如果有错误日志或其他相关日志,请在这里提供。

其他信息(Additional Information)

请提供任何其他相关的信息,如配置文件、错误信息或截图等。 配置信息: [sync_reader] cluster = true
address = "192.168.1.2:5012" password = "*********"
sync_rdb = true
sync_aof = true
prefer_replica = false
try_diskless = false

[redis_writer] cluster = true
sentinel = false
address = "192.168.1.1:5012" password = "*********"
tls = false off_reply = false

[filter] allow_key_prefix = [] allow_key_suffix = []

block_key_prefix = [] block_key_suffix = []

allow_db = [] block_db = []

allow_command = [] block_command = []

allow_command_group = [] block_command_group = []

function = ""

[advanced] dir = "data" ncpu = 0
pprof_port = 0
status_port = 0

log

log_file = "shake.log" log_level = "info"
log_interval = 5

rdb_restore_command_behavior = "panic"

pipeline_count_limit = 1024

target_redis_client_max_querybuf_len = 1073741824
target_redis_proto_max_bulk_len = 512_000_000

aws_psync = ""

empty_db_before_sync = false

[module]

target_mbbloom_version = 20603

rdb文件校验结果 Image

buzhidaojiaoshaming avatar Feb 13 '25 11:02 buzhidaojiaoshaming

同问,该怎么解决呢?

forachange avatar Feb 13 '25 15:02 forachange

使用新版本

suxb201 avatar Feb 14 '25 01:02 suxb201

@suxb201 我等下试试 最新版本 看看行不行

buzhidaojiaoshaming avatar Feb 14 '25 02:02 buzhidaojiaoshaming

4.3.2,新版本目前使用可以

forachange avatar Feb 14 '25 06:02 forachange

使用新版本

用了最新版本 确实可以 ,但是有个问题不清楚你有没有遇见,我在源集群5012实例 同步过来到目的集群发现5012的数据与源实例数据不一致 复制到其他实例了,很好奇为什么会出现这个情况。

buzhidaojiaoshaming avatar Feb 14 '25 10:02 buzhidaojiaoshaming

@buzhidaojiaoshaming 数据有过期

suxb201 avatar Feb 17 '25 01:02 suxb201