Merge pull request #3696 from UzimakiNaruto/master

ClusterPartition#slotRanges not update in ClusterConnectionManager#checkSlotsMigration
pull/3715/head
Nikita Koksharov 4 years ago committed by GitHub
commit 2805bd68a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -699,6 +699,13 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager {
if (!removedSlots.isEmpty()) {
log.info("{} slots removed from {}", removedSlots.cardinality(), currentPartition.getMasterAddress());
}
if (!addedSlots.isEmpty() || !removedSlots.isEmpty()) {
// https://github.com/redisson/redisson/issues/3695, slotRanges not update when slots of node changed.
Set<ClusterSlotRange> slotRanges = currentPartition.getSlotRanges();
slotRanges.clear();
slotRanges.addAll(newPartition.getSlotRanges());
}
break;
}
}

Loading…
Cancel
Save