Open caipengbo opened 8 months ago
Hi, i'm interested in this issue, could you please assign this to me?
@wsehjk Assigned. Go ahead :D
Based on my experience, you can share your opinion on this issue and how you'd like to implement it. If it's trivial, directly sending a patch is good.
Barely asking for an assignment without any thoughts or progress attempts often ends with giving up.
@caipengbo Would you mind giving some input about what you plan to improve?
@git-hulk This is my personal opinion for reference only:
DBIterator
and WALIterator
for data iterationSender
helper class for sending data and rate limitMigrationJob
stores what is really neededAs @tisonkun said, you can also share some of your plans and we can discuss them together @wsehjk .
@caipengbo Thanks for your input.
@git-hulk This is my personal opinion for reference only:
decouple the iteration logic from the send logic:
- use
DBIterator
andWALIterator
for data iteration- use a
Sender
helper class for sending data and rate limit- Make the two migration types more uniform
- Refactor Golang unit tests about data migration to make them more concise and faster to run
Other minor change:
MigrationJob
stores what is really needed- ...
As @tisonkun said, you can also share some of your plans and we can discuss them together @wsehjk .
Thank you for the info, really helpful, and i will walk through the code and share my thought before developing
Search before asking
Motivation
Now that we have support for
DBIterator
andWALIterator
, we can refactor migration code based on redis-command using these two classes. Also, now that we support two different migration types, we can make the code base about migration a bit cleaner than it is now.The unit tests could also be clearer.
Solution
No response
Are you willing to submit a PR?