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

Skip Selects when Destination is cluster Redis #771

Conversation

AbhishekRana23
Copy link

When Syncing from Standalone Redis to Cluster Redis. if there is a select and set on the source redis, Redis-shake copies it to the destination irrespective of destination being cluster redis or not. Currently if such a situation arise syncing is stopped with this error:

2024-02-26 06:25:57 INF not set status port 2024-02-26 06:25:57 INF start syncing... 2024-02-26 06:25:57 ERR [writer_10.60.45.25_6379] receive reply failed. cmd=[select 2], error=[ERR SELECT is not allowed in cluster mode] RedisShake/internal/writer/redis_standalone_writer.go:111 -> (*redisStandaloneWriter).processReply()runtime/asm_amd64.s:1598 -> goexit()

After these changes if destination is cluster, we won't change the dbId, instead directly run the respective command if destinaiton is a cluster.

@CLAassistant
Copy link

CLAassistant commented Feb 26, 2024

CLA assistant check
All committers have signed the CLA.

@suxb201
Copy link
Member

suxb201 commented Mar 5, 2024

RedisShake should panic instead of directly writing data from the other databses to db0, as this could lead to data corruption. The lua function feature can meet your needs.

@suxb201 suxb201 closed this Mar 22, 2024
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

Successfully merging this pull request may close these issues.

3 participants