SCAN iteration on same node fixed. #277

pull/282/head
Nikita 9 years ago
parent 14262bd25e
commit fe824978c1

@ -440,7 +440,7 @@ public class CommandExecutorService implements CommandExecutor {
ex.set(new RedisTimeoutException()); ex.set(new RedisTimeoutException());
final Timeout timeout = connectionManager.getTimer().newTimeout(retryTimerTask, connectionManager.getConfig().getTimeout(), TimeUnit.MILLISECONDS); final Timeout timeout = connectionManager.getTimer().newTimeout(retryTimerTask, connectionManager.getConfig().getTimeout(), TimeUnit.MILLISECONDS);
Future<RedisConnection> connectionFuture; final Future<RedisConnection> connectionFuture;
if (readOnlyMode) { if (readOnlyMode) {
if (client != null) { if (client != null) {
connectionFuture = connectionManager.connectionReadOp(source, command, client); connectionFuture = connectionManager.connectionReadOp(source, command, client);
@ -542,7 +542,11 @@ public class CommandExecutorService implements CommandExecutor {
if (future.isSuccess()) { if (future.isSuccess()) {
R res = future.getNow(); R res = future.getNow();
if (res instanceof RedisClientResult) { if (res instanceof RedisClientResult) {
((RedisClientResult)res).setRedisClient(client); RedisClient redisClient = client;
if (redisClient == null) {
redisClient = connectionFuture.getNow().getRedisClient();
}
((RedisClientResult)res).setRedisClient(redisClient);
} }
mainPromise.setSuccess(res); mainPromise.setSuccess(res);
} else { } else {

Loading…
Cancel
Save