Skip to content

one question about the cluster #2144

Closed
Closed

Description

@hzkltt

when the node A is migrate the slot 1 to node B. and the key of "book" is in slot 1. but the "book" is transmitting to B(but not yet to B). when one client of A send "set book redis" command to node A. how node A deal with this command? A return to client "ASK" error and redirect it to node B? but now, the key is in transmitting, it is not arrival B yet. when client send to node B "set book redis"(after send asking to B), how node B deal with this command?

Activity

  1. mattsta commented on Nov 19, 2014

    @mattsta
    Contributor

    Individual slots can be migrated using redis-trib.rb with the move_slot function: https://github.com/antirez/redis/blob/unstable/src/redis-trib.rb#L764-L809

    Currently all migration is user-initiated. The cluster itself doesn't migrate anything, it just fails over entire master nodes to their replicas. During normal operations, slots do not migrate.

  2. hzkltt commented on Nov 19, 2014

    @hzkltt
    Author

    it means that we should make sure there is no client operation to the key of the slots which is in migrating(initial by ourself),right?

  3. HeartSaVioR commented on Nov 20, 2014

    @HeartSaVioR
    Contributor

    @hzkltt keys in slot are migrated to another node one by one (using MIGRATE command), so there're no MIGRATING state in individual key's point of view when Redis processes your command.
    It's migrated or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions