Skip to content

Commit e7bf717

Browse files
uglideggivo
andauthored
Reduce log level to warn on reconnect in JedisSentinelPool (#4336)
* Reduce log level to warn on reconnect in JedisSentinelPool * reduce log level to WARN in SentineledConnectionProvider #4330 Losing connection to a Sentinel is a normal operational event. Sentinels can be restarted for maintenance, or because of network hiccups. The code automatically retries and recovers --------- Co-authored-by: ggivo <[email protected]>
1 parent 4ddd7f4 commit e7bf717

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/redis/clients/jedis/JedisSentinelPool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ public void onMessage(String channel, String message) {
407407
} catch (JedisException e) {
408408

409409
if (running.get()) {
410-
LOG.error("Lost connection to Sentinel at {}:{}. Sleeping 5000ms and retrying.", host,
411-
port, e);
410+
LOG.warn("Lost connection to Sentinel {}:{}. Sleeping {}ms and retrying.", host, port, subscribeRetryWaitTimeMillis,
411+
e);
412412
try {
413413
Thread.sleep(subscribeRetryWaitTimeMillis);
414414
} catch (InterruptedException e1) {

src/main/java/redis/clients/jedis/providers/SentineledConnectionProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ public void onMessage(String channel, String message) {
310310
} catch (JedisException e) {
311311

312312
if (running.get()) {
313-
LOG.error("Lost connection to sentinel {}. Sleeping {}ms and retrying.", node,
313+
LOG.error("Lost connection to Sentinel {}. Sleeping {}ms and retrying.", node,
314314
subscribeRetryWaitTimeMillis, e);
315315
try {
316316
Thread.sleep(subscribeRetryWaitTimeMillis);

0 commit comments

Comments
 (0)