diff --git a/src/main/java/org/elasticsearch/common/breaker/ChildMemoryCircuitBreaker.java b/src/main/java/org/elasticsearch/common/breaker/ChildMemoryCircuitBreaker.java index 7d1519ebcee..5ddf3de7551 100644 --- a/src/main/java/org/elasticsearch/common/breaker/ChildMemoryCircuitBreaker.java +++ b/src/main/java/org/elasticsearch/common/breaker/ChildMemoryCircuitBreaker.java @@ -90,9 +90,11 @@ public class ChildMemoryCircuitBreaker implements CircuitBreaker { @Override public void circuitBreak(String fieldName, long bytesNeeded) { this.trippedCount.incrementAndGet(); - throw new CircuitBreakingException("[" + this.name + "] Data too large, data for [" + + final String message = "[" + this.name + "] Data too large, data for [" + fieldName + "] would be larger than limit of [" + - memoryBytesLimit + "/" + new ByteSizeValue(memoryBytesLimit) + "]", + memoryBytesLimit + "/" + new ByteSizeValue(memoryBytesLimit) + "]"; + logger.debug(message); + throw new CircuitBreakingException(message, bytesNeeded, this.memoryBytesLimit); } diff --git a/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java b/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java index a1ca7d3c950..a763dcbb0ad 100644 --- a/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java +++ b/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java @@ -79,8 +79,10 @@ public class MemoryCircuitBreaker implements CircuitBreaker { */ public void circuitBreak(String fieldName, long bytesNeeded) throws CircuitBreakingException { this.trippedCount.incrementAndGet(); - throw new CircuitBreakingException("Data too large, data for field [" + fieldName + "] would be larger than limit of [" + - memoryBytesLimit + "/" + new ByteSizeValue(memoryBytesLimit) + "]"); + final String message = "Data too large, data for field [" + fieldName + "] would be larger than limit of [" + + memoryBytesLimit + "/" + new ByteSizeValue(memoryBytesLimit) + "]"; + logger.debug(message); + throw new CircuitBreakingException(message); } /**