Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

源端为阿里云数据库时报错,未知的 ARS 命令 #558

Open
qD6HrDvBtUuE9nH opened this issue Feb 6, 2023 · 7 comments
Open
Assignees
Labels
type: feature request New feature or request

Comments

@qD6HrDvBtUuE9nH
Copy link

qD6HrDvBtUuE9nH commented Feb 6, 2023

redis-shake3.18 同步 Redis 数据时提示未找到命令,影响控制台的观察,有没有方案解决这类报错告警信息,源和目标端都是redis5.0 社区版本.
报错提示:

{"level":"warn","time":"2023-02-06T13:49:42+08:00","message":"unknown command. argv=[ARS B\u0001\u0001\u0000\ufffdaP\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\ufffd\ufffdc\u0000\u0000\u0000\u0000\u0019#ω\n\u0000\u0000\u0000 PEXPIREAT curtainfans:cde0c26df7d751465b34383e6408520ae03999a7 1675748739252]"}
@qD6HrDvBtUuE9nH qD6HrDvBtUuE9nH changed the title redis-shake3.18同步redis数据时提示未找到命令,影响控制台的观察,有没有方案解决这类报错 redis-shake3.18同步redis数据时提示未找到命令,影响控制台的观察,有没有方案解决这类报错告警信息 Feb 6, 2023
@qD6HrDvBtUuE9nH qD6HrDvBtUuE9nH changed the title redis-shake3.18同步redis数据时提示未找到命令,影响控制台的观察,有没有方案解决这类报错告警信息 redis-shake3.18同步redis数据时提示未找到命令,影响控制台的观察,有没有方案解决这类报错告警信息,源和目标端都是redis5.0社区版本 Feb 6, 2023
@suxb201 suxb201 self-assigned this Feb 9, 2023
@suxb201 suxb201 added the type: feature request New feature or request label Feb 9, 2023
@suxb201
Copy link
Member

suxb201 commented Feb 9, 2023

你这是在尝试从阿里云 Redis 迁出数据对吧,目前还不支持呢。阿里云会在所有命令前面添加 ars 字段,需要去除。

@suxb201 suxb201 changed the title redis-shake3.18同步redis数据时提示未找到命令,影响控制台的观察,有没有方案解决这类报错告警信息,源和目标端都是redis5.0社区版本 源端为阿里云数据库时报错,未知的 ARS 命令 Feb 9, 2023
@suxb201
Copy link
Member

suxb201 commented Sep 28, 2023

已经原生支持去除。

@suxb201 suxb201 closed this as completed Sep 28, 2023
@lazy666666
Copy link

请问怎么使用去除ARS呢?

@suxb201
Copy link
Member

suxb201 commented May 22, 2024

@lazy666666 现在代码默认去除

@lazy666666
Copy link

我测试了最新版4.0.5版本的redis-shake,发现增量复制的时候,还是报错
2024-05-20 08:14:33 WRN unknown command. argv=[ARS B��� iKf set c 3]
2024-05-20 08:14:33 INF goroutine 7 [running]: [runtime/debug.Stack()]<-runtime/debug/stack.go:24 +0x65 [github.com/alibaba/RedisShake/internal/log.Panicf({0x7b2730, 0x45}, {0xc00005cf78, 0x4, 0x4})]<-github.com/alibaba/RedisShake/internal/log/func.go:27 +0x36 [github.com/alibaba/RedisShake/internal/writer.(*redisWriter).flushInterval(0xc0000729c0)]<-github.com/alibaba/RedisShake/internal/writer/redis.go:75 +0x3bd [created by github.com/alibaba/RedisShake/internal/writer.NewRedisWriter]<-github.com/alibaba/RedisShake/internal/writer/redis.go:35 +0x19c [
2024-05-20 08:14:33 PNC redisWriter received error. error=[ERR unknown command 'ARS', with args beginning with: 'B' 'set' 'c' '3' ], argv=[ARS B��� iKf set c 3], slots=[], reply=[]
panic: redisWriter received error. error=[ERR unknown command 'ARS', with args beginning with: 'B' 'set' 'c' '3' ], argv=[ARS B��� iKf set c 3], slots=[], reply=[]

goroutine 7 [running]:
github.com/rs/zerolog.(*Logger).Panic.func1({0xc0001880c0, 0x0})
github.com/rs/zerolog@v1.28.0/log.go:375 +0x2d
github.com/rs/zerolog.(*Event).msg(0xc0001ca000, {0xc0001880c0, 0xbe})
github.com/rs/zerolog@v1.28.0/event.go:156 +0x2b8
github.com/rs/zerolog.(*Event).Msgf(0xc0001ca000, {0x7b2730, 0x21c}, {0xc000355f78, 0x79a3e6, 0x3})
github.com/rs/zerolog@v1.28.0/event.go:129 +0x4e
github.com/alibaba/RedisShake/internal/log.Panicf({0x7b2730, 0x45}, {0xc000355f78, 0x4, 0x4})
github.com/alibaba/RedisShake/internal/log/func.go:32 +0xef
github.com/alibaba/RedisShake/internal/writer.(*redisWriter).flushInterval(0xc0000729c0)
github.com/alibaba/RedisShake/internal/writer/redis.go:75 +0x3bd
created by github.com/alibaba/RedisShake/internal/writer.NewRedisWriter
github.com/alibaba/RedisShake/internal/writer/redis.go:35 +0x19c

@suxb201
Copy link
Member

suxb201 commented May 22, 2024

@lazy666666 确实忘记处理了,ARS 命令结构是 arg xxxx 真正命令,比如 set k v 会被包成 ars xxx set k v
所以你可以在这里改一下,如果是 arg 命令的话,去掉前两个元素,也欢迎交个 PR:
image

@suxb201 suxb201 reopened this May 22, 2024
@lazy666666
Copy link

好嘞,感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants