refactoring

pull/6077/head
Nikita Koksharov 6 months ago
parent ec60fac4ae
commit 87c581e026

@ -756,16 +756,12 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager {
// https://github.com/redisson/redisson/issues/3635
Map<String, MasterSlaveEntry> nodeEntries = clusterLastPartitions.stream()
// .filter(e -> getEntry(e.getSlotRanges().iterator().next().getStartSlot()) != null)
.collect(Collectors.toMap(p -> p.getNodeId(),
p -> getEntry(p.getSlotRanges().iterator().next().getStartSlot())));
Set<Integer> changedSlots = new HashSet<>();
for (ClusterPartition currentPartition : clusterLastPartitions) {
String nodeId = currentPartition.getNodeId();
// if (!nodeEntries.containsKey(nodeId)) {
// continue;
// }
for (ClusterPartition newPartition : newPartitions) {
if (!Objects.equals(nodeId, newPartition.getNodeId())

Loading…
Cancel
Save