--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-db/414e32af-d6df-454f-b942-4ff4ec1578c8o%40googlegroups.com.
Itamar Haber ![]() |
Disclaimer
The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.
Hello Spencer,Short explainer: `MIGRATE` moves keys between databases, whereas a cluster is a single logical database. Put differently, in the cluster keys are hashed to slot that, in turn, reside on shards - you can't migrate keys, only move slots around.Cheers,
On Tue, Jul 21, 2020 at 8:57 AM <spencer...@gmail.com> wrote:
Hi. I've got some code that will setup a little mini redis cluster on my local machine. I then setup a bunch of keys and now I've been playing with migrating them. I've successfully migrated keys from one node to another, but I don't understand the redirect behavior that I'm seeing. Here is an example...--E:\redis>redis-cli -p 7000 migrate 127.0.0.1 7004 strawberries 0 0OKE:\redis>redis-cli -p 7000 get strawberries(error) ASK 2250 127.0.0.1:7004E:\redis>redis-cli -p 7004 get strawberries(error) MOVED 2250 127.0.0.1:7000Before the first command shown above, I had already set the slot in question (2250) as importing on the destination node and migrating on the source node.What I don't understand is why, after migrating the key "strawberries", that the node on port 7004 would still give me a "moved" redirect. Though the migration of all keys for slot 2250 might not be complete, shouldn't I still at this point be able to fetch the key from the destination node?Once I issue the set-slot command on the destination node, the migration completes, and then I can fetch the key from 7004.Do I just not understand the behavior here? It doesn't make sense to me that both nodes would redirect toward one another. The client would just bounce back and forth between the source and destination nodes looking for the key "strawberries" until the migration was complete.I know that ASK and MOVED are two different kinds of redirects; the the former is meant to solve some sort of race condition. I'll have to read up on that some more. Until then, I really don't understand what's going on here.This is Redis for windows, by the way. Maybe it has a bug?
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-db/414e32af-d6df-454f-b942-4ff4ec1578c8o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-db/b00234e8-e39d-4f76-a965-a775aaa42c23o%40googlegroups.com.