|
|
|
@ -495,7 +495,7 @@ public class MasterSlaveConnectionManager implements ConnectionManager {
|
|
|
|
|
for (MasterSlaveEntry entry : client2entry.values()) {
|
|
|
|
|
if (URIBuilder.compare(entry.getClient().getAddr(), addr)) {
|
|
|
|
|
return entry;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (entry.hasSlave(addr)) {
|
|
|
|
|
return entry;
|
|
|
|
|
}
|
|
|
|
@ -562,6 +562,11 @@ public class MasterSlaveConnectionManager implements ConnectionManager {
|
|
|
|
|
RedisNodeNotFoundException ex = new RedisNodeNotFoundException("Node: " + source + " hasn't been discovered yet");
|
|
|
|
|
return RedissonPromise.newFailedFuture(ex);
|
|
|
|
|
}
|
|
|
|
|
if (source.getRedirect() != null &&
|
|
|
|
|
!URIBuilder.compare(entry.getClient().getAddr(), source.getAddr()) &&
|
|
|
|
|
entry.hasSlave(source.getAddr())) {
|
|
|
|
|
return entry.redirectedConnectionWriteOp(command, source.getAddr());
|
|
|
|
|
}
|
|
|
|
|
return entry.connectionWriteOp(command);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|