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

codis+pika主从同步失败 #1031

Closed
chenjing7232 opened this issue Mar 2, 2021 · 1 comment
Closed

codis+pika主从同步失败 #1031

chenjing7232 opened this issue Mar 2, 2021 · 1 comment

Comments

@chenjing7232
Copy link

codis版本:codis-pika-v1.1.0.tar.bz2
pika版本:3.3.6
操作:codis web上主从同步操作
报错如下:
images.githubusercontent.com/14304247/109583389-cd713480-7b3a-11eb-93d8-328ea4d43062.png">
2021/03/02 09:31:50 topom_group.go:496: [WARN] redis ***:9221 set master to ***:9221 failed
[error]: ERR This command is not supported in current configuration
4 /home/spinlock/.gopath/src/github.com/CodisLabs/codis/pkg/utils/redis/redis.go:55
github.com/CodisLabs/codis/pkg/utils/redis.(*Client).Do
3 /home/spinlock/.gopath/src/github.com/CodisLabs/codis/pkg/utils/redis/redis.go:141
github.com/CodisLabs/codis/pkg/utils/redis.(*Client).SetMaster
2 /home/spinlock/.gopath/src/github.com/CodisLabs/codis/pkg/topom/topom_group.go:495
github.com/CodisLabs/codis/pkg/topom.(*Topom).newSyncActionExecutor.func1
1 /home/spinlock/.gopath/src/github.com/CodisLabs/codis/pkg/topom/topom_action.go:73
github.com/CodisLabs/codis/pkg/topom.(*Topom).ProcessSyncAction
0 /home/spinlock/.gopath/src/github.com/CodisLabs/codis/pkg/topom/topom.go:230
github.com/CodisLabs/codis/pkg/topom.(*Topom).Start.func4

sharding模式下不支持slaveof命令吗?但官方文档上是说codis+pika,是要使用sharidng模式的,求大佬告知问题出在哪里?跪谢!

127.0.0.1:9221> config get instance-mode

  1. "instance-mode"
  2. "sharding"
    127.0.0.1:9221> slaveof 10.81.75.4 9221
    (error) ERR This command is not supported in current configuration
@kernelai
Copy link
Collaborator

kernelai commented Mar 2, 2021

原版codis发送主从同步采用事务的方式,pika是不支持事务的,因此需要修改下官方codis的少量代码。参考https://github.com/Qihoo360/pika/wiki/Support-Cluster-Slots

@luky116 luky116 closed this as completed May 19, 2023
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

No branches or pull requests

3 participants