[scan_reader]
cluster = true # set to true if source is a redis cluster
address = "cluster.0d6hxg.clustercfg.use1.cache.amazonaws.com:6379" # when cluster is true, set address to one of the cluster node
username = "" # keep empty if not using ACL
password = "" # keep empty if no authentication is required
tls = false
dbs = [] # set you want to scan dbs such as [1,5,7], if you don't want to scan all
scan = true # set to false if you don't want to scan keys
ksn = true # set to true to enabled Redis keyspace notifications (KSN) subscription
count = 50 # number of keys to scan per iteration
[redis_writer]
cluster = false # set to true if target is a redis cluster
sentinel = false # set to true if target is a redis sentinel
master = "" # set to master name if target is a redis sentinel
address = "127.0.0.1:6379"
username = "" # keep empty if not using ACL
password = ""
tls = false
off_reply = false # ture off the server reply
[advanced]
dir = "data"
ncpu = 0 # runtime.GOMAXPROCS, 0 means use runtime.NumCPU() cpu cores
pprof_port = 0 # pprof port, 0 means disable
status_port = 0 # status port, 0 means disable
log
log_file = "shake.log"
log_level = "info" # debug, info or warn
log_interval = 5 # in seconds
问题描述(Issue Description)
从 Aws ElastiCache 集群模式迁移到 自建的 redis 单实例时候,全量同步没问题,一旦源端比如做 redis-benchmark 写数据时,redis-shake 工具就报错退出了。
环境信息(Environment)
日志信息(Logs)
2024-06-18 10:18:19 INF not set pprof port 2024-06-18 10:18:19 INF address=cluster.0d6hxg.clustercfg.use1.cache.amazonaws.com:6379, reply=a8ac90080a0842e4e410f6d2c4a46905371f053f 10.0.1.143:6379@1122 master - 0 1718705897745 2 connected 0-5461 ee0dcd4a6c7494a94a7209bdd3b363a07148c250 10.0.1.29:6379@1122 master - 0 1718705898751 0 connected 10923-16383 cb1a26882039429b3411b1498b2874a3543c63dc 10.0.1.156:6379@1122 myself,master - 0 1718705897000 1 connected 5462-10922 2024-06-18 10:18:19 INF create ScanClusterReader: cluster.0d6hxg.clustercfg.use1.cache.amazonaws.com:6379 2024-06-18 10:18:19 INF create RedisStandaloneWriter: 127.0.0.1:6379 2024-06-18 10:18:19 INF not set status port 2024-06-18 10:18:19 INF start syncing... 2024-06-18 10:18:24 INF read_count=[293899], read_ops=[60444.47], write_count=[293898], write_ops=[60443.46], src-1, scan_dbid=[0], scan_percent=[3.36%], need_update_count=[100000] 2024-06-18 10:18:29 INF read_count=[581715], read_ops=[58074.08], write_count=[581714], write_ops=[58074.08], src-2, scan_dbid=[0], scan_percent=[5.12%], need_update_count=[100000] 2024-06-18 10:18:34 INF read_count=[870347], read_ops=[57479.75], write_count=[870346], write_ops=[57479.75], src-0, scan_dbid=[0], scan_percent=[6.56%], need_update_count=[99997] 2024-06-18 10:18:39 INF read_count=[1161000], read_ops=[59903.60], write_count=[1161000], write_ops=[59903.60], src-1, scan_dbid=[0], scan_percent=[8.17%], need_update_count=[100000] 2024-06-18 10:18:44 INF read_count=[1413087], read_ops=[35417.94], write_count=[1413086], write_ops=[35417.94], src-2, scan_dbid=[0], scan_percent=[9.74%], need_update_count=[100000] 2024-06-18 10:18:49 INF read_count=[1588861], read_ops=[36192.32], write_count=[1588860], write_ops=[36192.32], src-0, scan_dbid=[0], scan_percent=[9.89%], need_update_count=[100000] 2024-06-18 10:18:54 ERR unexpected EOF RedisShake/internal/reader/scan_standalone_reader.go:124 -> (*scanStandaloneReader).subscript() runtime/asm_amd64.s:1598 -> goexit()
其他信息(Additional Information)
scan.toml 如下: function = ""
[scan_reader] cluster = true # set to true if source is a redis cluster address = "cluster.0d6hxg.clustercfg.use1.cache.amazonaws.com:6379" # when cluster is true, set address to one of the cluster node username = "" # keep empty if not using ACL password = "" # keep empty if no authentication is required tls = false dbs = [] # set you want to scan dbs such as [1,5,7], if you don't want to scan all scan = true # set to false if you don't want to scan keys ksn = true # set to true to enabled Redis keyspace notifications (KSN) subscription count = 50 # number of keys to scan per iteration
[redis_writer] cluster = false # set to true if target is a redis cluster sentinel = false # set to true if target is a redis sentinel master = "" # set to master name if target is a redis sentinel address = "127.0.0.1:6379" username = "" # keep empty if not using ACL password = "" tls = false off_reply = false # ture off the server reply
[advanced] dir = "data" ncpu = 0 # runtime.GOMAXPROCS, 0 means use runtime.NumCPU() cpu cores pprof_port = 0 # pprof port, 0 means disable status_port = 0 # status port, 0 means disable
log
log_file = "shake.log" log_level = "info" # debug, info or warn log_interval = 5 # in seconds
rdb_restore_command_behavior = "rewrite" # panic, rewrite or skip pipeline_count_limit = 1024 target_redis_client_max_querybuf_len = 1024_000_000 target_redis_proto_max_bulk_len = 512_000_000 aws_psync = "" empty_db_before_sync = false