Fixed - race condition during hostname resolution in sentinel mode which may cause slave shutdown. #4003

pull/4031/head
Nikita Koksharov 3 years ago
parent 238ce0790e
commit f055696473

@ -444,7 +444,7 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager {
return;
}
Set<RedisURI> currentSlaves = new HashSet<>(slavesMap.size());
Set<RedisURI> currentSlaves = Collections.newSetFromMap(new ConcurrentHashMap<>(slavesMap.size()));
AsyncCountDownLatch latch = new AsyncCountDownLatch();
for (Map<String, String> map : slavesMap) {
if (map.isEmpty()) {

Loading…
Cancel
Save