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

Add option to disable incremental sync in kvrocks2redis #2165

Open
1 of 2 tasks
QQxiaoyuyu opened this issue Mar 13, 2024 · 4 comments
Open
1 of 2 tasks

Add option to disable incremental sync in kvrocks2redis #2165

QQxiaoyuyu opened this issue Mar 13, 2024 · 4 comments
Assignees
Labels
enhancement type enhancement

Comments

@QQxiaoyuyu
Copy link
Contributor

QQxiaoyuyu commented Mar 13, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.8

Minimal reproduce step

Looking downwards

What did you expect to see?

Looking downwards

What did you see instead?

Looking downwards

Anything Else?

Currently, kvrocks2redis will synchronize incremental data by default, but if the increment is too large, many data files will be written, we can consider adding a configuration that does not write incremental data, and only does full synchronization.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@QQxiaoyuyu QQxiaoyuyu added the bug type bug label Mar 13, 2024
@PragmaTwice PragmaTwice changed the title kvrocks2redis 功能完善 Add option to disable incremental sync in kvrocks2redis Mar 13, 2024
@PragmaTwice PragmaTwice added enhancement type enhancement and removed bug type bug labels Mar 13, 2024
@zjregee
Copy link
Member

zjregee commented Apr 8, 2024

I'd like to try this.

@git-hulk
Copy link
Member

git-hulk commented Apr 8, 2024

@zjregee Thank you!

@zjregee
Copy link
Member

zjregee commented Apr 23, 2024

Hello, @git-hulk. I'm running into some issues while trying to resolve this issue and hope to get your advice.

kvrocks2redis currently updates the data into a new Redis step by step by writing an aof file for all the data in the kvrocks, which is not reasonable when the kvrocks contains a large amount of data. In order to solve this problem, we can first create an rdb file, synchronize a large amount of data at once through the rdb file, and continue to synchronize some unsynchronized data through the original incremental synchronization method.

But I have doubts about how to pass the rdb file to the new Redis. Redis does not seem to support receiving rdb file directly through a certain command. If the new Redis is synchronized through slaveof, this new master-slave relationship does not seem to meet this requirement.

How should I solve this problem? In order for the Redis to receive the rdb file, I seem to need to send the rdb file to the data directory related to the new Redis and restart the Redis. I am not sure if this method is reasonable.

@git-hulk
Copy link
Member

@zjregee Sorry for not getting back to you sooner.

How should I solve this problem? In order for the Redis to receive the rdb file, I seem to need to send the rdb file to the data directory related to the new Redis and restart the Redis. I am not sure if this method is reasonable.

Redis only supports loading the RDB from the replication for now, and it should be not good to require users to restart the Redis server for syncing the RDB.

kvrocks2redis currently updates the data into a new Redis step by step by writing an aof file for all the data in the kvrocks, which is not reasonable when the kvrocks contains a large amount of data.

For this scenario, perhaps we can send the key value to the target node directly instead of writing AOF.

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

No branches or pull requests

4 participants