stickermule / rump

Hot sync two Redis servers using dumps.
MIT License
491 stars 94 forks source link

Added restored keys count status report on USR1 signal, and at the end of the sync. #8

Closed adnanh closed 7 years ago

adnanh commented 7 years ago

Similar to what the dd does when the user sends the USR1 signal, for windows platform, this is a noop.

Also added the same report of restored keys count to be printed at the end of the sync.

nixtrace commented 7 years ago

Hey, thanks for opening the PR. :)

We're thinking about adding something like this, but there's a difference between what dd does and what rump does.

While dd generally knows upfront the total data, and can calculate a progress, rump can't, because of the SCAN command.

Same thing goes for calculating the restored keys.

One of the first versions of rump had the total calculated, but that number is not accurate, because SCAN can return elements multiple times, as described in the docs: https://redis.io/commands/scan

If you know that your DB has 100 keys and rump outputs 103 keys transferred, it looks wrong.

Let's discuss in an issue how can we solve the progress problem?

nixtrace commented 7 years ago

Ok, cool. Let's close it for now then. Thanks! :)