Merge pull request #6398 from aramperes/fix-6397

fix: resolve Sentinel master change through NAT
pull/6403/head
Nikita Koksharov 2 weeks ago committed by GitHub
commit 80c9a2f918
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -508,7 +508,8 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager {
RFuture<RedisURI> masterFuture = connection.async(1, cfg.getRetryInterval(), cfg.getTimeout(),
StringCodec.INSTANCE, masterHostCommand, cfg.getMasterName());
return masterFuture
.thenCompose(u -> serviceManager.resolveIP(scheme, u))
.thenCompose(u -> resolveIP(u.getHost(), "" + u.getPort()))
.thenApply(this::toURI)
.thenCompose(newMaster -> {
RedisURI current = currentMaster.get();
if (!newMaster.equals(current)

Loading…
Cancel
Save