tair-opensource / RedisShake

RedisShake is a Redis data processing and migration tool.
https://tair-opensource.github.io/RedisShake/
MIT License
3.83k stars 697 forks source link

同步进程经常自动退出 #859

Open chenhuichao1997 opened 1 month ago

chenhuichao1997 commented 1 month ago

问题描述(Issue Description)

redis-shake 同步进程开启后,进程会隔段时间自己报错退出

环境信息(Environment)

日志信息(Logs)

[root@- shake]# cat data/second-redis/shake.log |grep -i error {"level":"error","time":"2024-09-02T10:16:40+08:00","message":"EOF\n\t\t\tRedisShake/internal/reader/sync_standalone_reader.go:246 -> (syncStandaloneReader).receiveAOF()\n\t\t\truntime/asm_amd64.s:1598 -> goexit()"} {"level":"error","time":"2024-09-03T09:19:48+08:00","message":"EOF\n\t\t\tRedisShake/internal/reader/sync_standalone_reader.go:246 -> (syncStandaloneReader).receiveAOF()\n\t\t\truntime/asm_amd64.s:1598 -> goexit()"} {"level":"error","time":"2024-09-04T08:33:09+08:00","message":"EOF\n\t\t\tRedisShake/internal/reader/sync_standalone_reader.go:246 -> (*syncStandaloneReader).receiveAOF()\n\t\t\truntime/asm_amd64.s:1598 -> goexit()"}

其他信息(Additional Information)

已排查进度: 根据报错位置判断 sync_standalone_reader.go:246,错误信息如下,一开始以为是切片长度不够导致,后来发现redis实例中并没有大key

        ...
    buf := make([]byte, 16*1024) // 16KB is enough for writing file
        ...
            n, err := rd.Read(buf)
            if err != nil {
                log.Panicf(err.Error())                    ##246行
            }
        ...

有遇到过的同学 麻烦帮忙解答下,万分感谢

suxb201 commented 1 month ago

https://tair-opensource.github.io/RedisShake/zh/reader/sync_reader.html#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98