Fixed - master can't be changed anymore if new master wasn't added the first time. #1839

pull/1871/head
Nikita Koksharov 6 years ago
parent 6531573603
commit 4f2a4b9811

@ -438,6 +438,12 @@ public class MasterSlaveEntry {
@Override
public void operationComplete(Future<RedisClient> future) throws Exception {
if (!future.isSuccess()) {
if (oldMaster != masterEntry) {
writeConnectionPool.remove(masterEntry);
pubSubConnectionPool.remove(masterEntry);
masterEntry.getClient().shutdownAsync();
masterEntry = oldMaster;
}
log.error("Unable to change master from: " + oldMaster.getClient().getAddr() + " to: " + address, future.cause());
return;
}

Loading…
Cancel
Save