Improvement - amount of created connections in parallel reduced to 5. For better stability.

pull/4272/head
Nikita Koksharov 3 years ago
parent a251361218
commit 0d8a7dd9a2

@ -85,7 +85,7 @@ abstract class ConnectionPool<T extends RedisConnection> {
CompletableFuture<Void> initPromise = new CompletableFuture<>();
AtomicInteger initializedConnections = new AtomicInteger(minimumIdleSize);
int startAmount = Math.min(10, minimumIdleSize);
int startAmount = Math.min(5, minimumIdleSize);
AtomicInteger requests = new AtomicInteger(startAmount);
for (int i = 0; i < startAmount; i++) {
createConnection(checkFreezed, requests, entry, initPromise, minimumIdleSize, initializedConnections);

Loading…
Cancel
Save