A. Mark slot as IMPORTING on node B before MIGRATE
B. Run CLUSTER DELSLOTS 7000 on node A first
C. Use CLUSTER ADDSLOTS 7000 on node B after migration
D. Restart both nodes before migration
Solution
Step 1: Identify missing IMPORTING state
Destination node must mark slot as IMPORTING before receiving keys.
Step 2: Add missing command
Use CLUSTER SETSLOT 7000 IMPORTING nodeA_id on node B before MIGRATE.
Final Answer:
Mark slot as IMPORTING on node B before MIGRATE -> Option A
Quick Check:
IMPORTING state needed on destination [OK]
Hint: Always mark IMPORTING on target node before MIGRATE [OK]
Common Mistakes:
Skipping IMPORTING step
Deleting slots prematurely
Restarting nodes unnecessarily
5. During a large-scale resharding, you want to move multiple hash slots from node A to node B without downtime. Which sequence of actions ensures data consistency and minimal disruption?
hard
A. Assign slots to node B first, then migrate keys, finally mark MIGRATING on node A
B. Migrate keys first, then mark slots IMPORTING on node B, finally mark MIGRATING on node A
C. Mark slots MIGRATING on node A, mark IMPORTING on node B, migrate keys, then assign slots to node B
D. Delete slots on node A, migrate keys, then assign slots to node B
Solution
Step 1: Mark slots as MIGRATING on source node
This prevents writes to those slots on node A during migration.
Step 2: Mark slots as IMPORTING on destination node
Allows node B to accept keys for those slots.
Step 3: Migrate keys using MIGRATE command
Safely transfer keys from node A to node B.
Step 4: Assign slots ownership to node B
Finalizes the slot ownership after migration completes.
Final Answer:
Mark slots MIGRATING on node A, mark IMPORTING on node B, migrate keys, then assign slots to node B -> Option C
Quick Check:
MIGRATING -> IMPORTING -> MIGRATE -> ASSIGN [OK]
Hint: Follow MIGRATING, IMPORTING, MIGRATE, then assign slots [OK]
Common Mistakes:
Assigning slots before migration
Migrating keys without marking IMPORTING
Deleting slots before migration
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.