-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Closed
Labels
Description
If the connection breaks in the middle of a resharding operation, MIGRATE
may end not deleting the key from the source node, while the target node key was already materialized.
This will later result in redis-trib fix
not being able to handle the condition, with an error like that:
*** Target key my_key exists. Replace it for FIX.
This should be fixed with one of the following solutions.
- Always use MIGRATE REPLACE.
- Don't overwrite existing keys and rename one of the two, outputting the key name, so the database is usable and no data is lost, and the sysadmin can check what happened.
- Possibly... modify DEBUG DIGEST to be able to take a single key so that we can check if the two keys are the same (very likely most of the times) and silently do the right thing.
- Some other solution... but asking the user is probably not wise.