Merge branch 'master' of github.com:redisson/redisson

pull/3384/head
Nikita Koksharov 4 years ago
commit 79c7397992

@ -313,11 +313,16 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager {
if (!config.checkSkipSlavesInit()) {
List<RFuture<Void>> fs = entry.initSlaveBalancer(partition.getFailedSlaveAddresses(), masterClient);
AtomicInteger counter = new AtomicInteger(fs.size());
AtomicInteger errorCounter = new AtomicInteger(fs.size());
for (RFuture<Void> future : fs) {
future.onComplete((r, ex) -> {
if (ex != null) {
log.error("unable to add slave for: " + partition.getMasterAddress()
+ " slot ranges: " + partition.getSlotRanges(), ex);
if (errorCounter.decrementAndGet() == 0) {
result.tryFailure(ex);
return;
}
}
if (counter.decrementAndGet() == 0) {

Loading…
Cancel
Save