From 76e55a6b30c3c4c5f11f00c36afc07d4573dd681 Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Sat, 2 Nov 2019 12:29:33 +0300 Subject: [PATCH] refactoring --- redisson/src/main/java/org/redisson/MapWriteBehindTask.java | 2 ++ .../src/main/java/org/redisson/command/RedisExecutor.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/redisson/src/main/java/org/redisson/MapWriteBehindTask.java b/redisson/src/main/java/org/redisson/MapWriteBehindTask.java index a053e4ce6..92f4f210e 100644 --- a/redisson/src/main/java/org/redisson/MapWriteBehindTask.java +++ b/redisson/src/main/java/org/redisson/MapWriteBehindTask.java @@ -65,6 +65,8 @@ public class MapWriteBehindTask { future.onComplete((task, e) -> { if (e != null) { log.error(e.getMessage(), e); + + enqueueTask(); return; } diff --git a/redisson/src/main/java/org/redisson/command/RedisExecutor.java b/redisson/src/main/java/org/redisson/command/RedisExecutor.java index 057ae1b21..10f034cc9 100644 --- a/redisson/src/main/java/org/redisson/command/RedisExecutor.java +++ b/redisson/src/main/java/org/redisson/command/RedisExecutor.java @@ -186,7 +186,7 @@ public class RedisExecutor { if (connectionFuture.cancel(false)) { if (exception == null) { - exception = new RedisTimeoutException("Unable to acquire connection! Increase connection pool size and/or retryInterval" + exception = new RedisTimeoutException("Unable to acquire connection! Increase connection pool size and/or retryInterval settings " + "Node source: " + source + ", command: " + LogHelper.toString(command, params) + " after " + attempt + " retry attempts"); @@ -197,7 +197,7 @@ public class RedisExecutor { if (attempt == attempts) { if (writeFuture != null && writeFuture.cancel(false)) { if (exception == null) { - exception = new RedisTimeoutException("Command still hasn't been written into connection! Increase nettyThreads and/or retryInterval" + exception = new RedisTimeoutException("Command still hasn't been written into connection! Increase nettyThreads and/or retryInterval settings " + "Node source: " + source + ", connection: " + connectionFuture.getNow() + ", command: " + LogHelper.toString(command, params) + " after " + attempt + " retry attempts"); @@ -334,7 +334,7 @@ public class RedisExecutor { attemptPromise.tryFailure( new RedisResponseTimeoutException("Redis server response timeout (" + timeoutAmount + " ms) occured" - + " after " + attempt + " retry attempts. Command: " + + " after " + attempt + " retry attempts. Increase nettyThreads and/or timeout settings. Command: " + LogHelper.toString(command, params) + ", channel: " + connection.getChannel())); } };