Fixed - MOVED or ASK response from Redis causes "Unable to acquire connection!" error. #3370

pull/3417/head
Nikita Koksharov 4 years ago
parent 36983e6364
commit e70c91b7f9

@ -156,11 +156,11 @@ public class RedisExecutor<V, R> {
checkWriteFuture(writeFuture, attemptPromise, connection); checkWriteFuture(writeFuture, attemptPromise, connection);
} }
}); });
releaseConnection(attemptPromise, connectionFuture);
}); });
attemptPromise.onComplete((r, e) -> { attemptPromise.onComplete((r, e) -> {
releaseConnection(attemptPromise, connectionFuture);
checkAttemptPromise(attemptPromise, connectionFuture); checkAttemptPromise(attemptPromise, connectionFuture);
}); });
} }
@ -624,7 +624,6 @@ public class RedisExecutor<V, R> {
} }
protected void releaseConnection(RPromise<R> attemptPromise, RFuture<RedisConnection> connectionFuture) { protected void releaseConnection(RPromise<R> attemptPromise, RFuture<RedisConnection> connectionFuture) {
attemptPromise.onComplete((res, e) -> {
if (!connectionFuture.isSuccess()) { if (!connectionFuture.isSuccess()) {
return; return;
} }
@ -641,7 +640,6 @@ public class RedisExecutor<V, R> {
log.debug("connection released for command {} and params {} from slot {} using connection {}", log.debug("connection released for command {} and params {} from slot {} using connection {}",
command, LogHelper.toString(params), source, connection); command, LogHelper.toString(params), source, connection);
} }
});
} }
public RedisClient getRedisClient() { public RedisClient getRedisClient() {

Loading…
Cancel
Save