Include Redis cluster and shard address in circuit breaker log
This commit is contained in:
parent
18ef3da261
commit
a87690d817
|
@ -248,7 +248,7 @@ public class LettuceShardCircuitBreaker implements NettyCustomizer {
|
||||||
// RedisNoScriptException doesn’t indicate a fault the breaker can protect
|
// RedisNoScriptException doesn’t indicate a fault the breaker can protect
|
||||||
if (throwable != null && !(throwable instanceof RedisNoScriptException)) {
|
if (throwable != null && !(throwable instanceof RedisNoScriptException)) {
|
||||||
breaker.onError(durationNanos, TimeUnit.NANOSECONDS, throwable);
|
breaker.onError(durationNanos, TimeUnit.NANOSECONDS, throwable);
|
||||||
logger.warn("Command completed with error", throwable);
|
logger.warn("Command completed with error for: {}/{}", clusterName, shardAddress, throwable);
|
||||||
} else {
|
} else {
|
||||||
breaker.onSuccess(durationNanos, TimeUnit.NANOSECONDS);
|
breaker.onSuccess(durationNanos, TimeUnit.NANOSECONDS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue