Fixed - RBatch with executionMode = REDIS_WRITE_ATOMIC throws NPE in case of connection starvation.

pull/4733/head
Nikita Koksharov 2 years ago
parent 0e5c759602
commit 95fe0bdc2f

@ -198,15 +198,16 @@ public class RedisQueuedBatchExecutor<V, R> extends BaseRedisBatchExecutor<V, R>
if (entry.getConnectionFuture() != null) {
return entry.getConnectionFuture();
connectionFuture = entry.getConnectionFuture();
return connectionFuture;
}
synchronized (this) {
if (entry.getConnectionFuture() != null) {
return entry.getConnectionFuture();
connectionFuture = entry.getConnectionFuture();
return connectionFuture;
}
CompletableFuture<RedisConnection> connectionFuture;
if (this.options.getExecutionMode() == ExecutionMode.REDIS_WRITE_ATOMIC) {
connectionFuture = connectionManager.connectionWriteOp(source, null);
} else {

Loading…
Cancel
Save