Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/113561.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113561
summary: Add link to Circuit Breaker "Data too large" exception message
area: Infra/Circuit Breakers
type: enhancement
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public enum ReferenceDocs {
FLOOD_STAGE_WATERMARK,
X_OPAQUE_ID,
FORMING_SINGLE_NODE_CLUSTERS,
CIRCUIT_BREAKER_ERRORS,
// this comment keeps the ';' on the next line so every entry above has a trailing ',' which makes the diff for adding new links cleaner
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.elasticsearch.common.breaker;

import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.ReferenceDocs;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.indices.breaker.BreakerSettings;
import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService;
Expand Down Expand Up @@ -87,7 +88,8 @@ public void circuitBreak(String fieldName, long bytesNeeded) {
+ memoryBytesLimit
+ "/"
+ ByteSizeValue.ofBytes(memoryBytesLimit)
+ "]";
+ "]; for more information, see "
+ ReferenceDocs.CIRCUIT_BREAKER_ERRORS;
logger.debug(() -> format("%s", message));
throw new CircuitBreakingException(message, bytesNeeded, memoryBytesLimit, durability);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.ReferenceDocs;
import org.elasticsearch.common.breaker.ChildMemoryCircuitBreaker;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.breaker.CircuitBreakingException;
Expand Down Expand Up @@ -474,7 +475,8 @@ public void accept(String key, CircuitBreaker breaker) {
appendBytesSafe(message, (long) (breaker.getUsed() * breaker.getOverhead()));
}
});
message.append("]");
message.append("]; for more information, see ");
message.append(ReferenceDocs.CIRCUIT_BREAKER_ERRORS);
return message.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"Content moved to reference-docs-links.txt",
"This is a temporary placeholder to satisfy sub check_elasticsearch_links in the docs build",
"Remove with @UpdateForV10 (if not before)"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ MAX_SHARDS_PER_NODE size-your-shards
FLOOD_STAGE_WATERMARK fix-watermark-errors.html
X_OPAQUE_ID api-conventions.html#x-opaque-id
FORMING_SINGLE_NODE_CLUSTERS modules-discovery-bootstrap-cluster.html#modules-discovery-bootstrap-cluster-joining
CIRCUIT_BREAKER_ERRORS circuit-breaker-errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

package org.elasticsearch.indices.breaker;

import org.elasticsearch.common.ReferenceDocs;
import org.elasticsearch.common.breaker.ChildMemoryCircuitBreaker;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.breaker.CircuitBreakingException;
Expand Down Expand Up @@ -911,9 +912,11 @@ public double getOverhead() {
),
oneOf(
"[parent] Data too large, data for [test] would be [3/3b], which is larger than the limit of [6/6b], "
+ "usages [child=7/7b, otherChild=8/8b]",
+ "usages [child=7/7b, otherChild=8/8b]; for more information, see "
+ ReferenceDocs.CIRCUIT_BREAKER_ERRORS,
"[parent] Data too large, data for [test] would be [3/3b], which is larger than the limit of [6/6b], "
+ "usages [otherChild=8/8b, child=7/7b]"
+ "usages [otherChild=8/8b, child=7/7b]; for more information, see "
+ ReferenceDocs.CIRCUIT_BREAKER_ERRORS
)
);

Expand All @@ -928,7 +931,8 @@ public double getOverhead() {
),
equalTo(
"[parent] Data too large, data for [test] would be [3/3b], which is larger than the limit of [6/6b], "
+ "real usage: [2/2b], new bytes reserved: [1/1b], usages []"
+ "real usage: [2/2b], new bytes reserved: [1/1b], usages []; for more information, see "
+ ReferenceDocs.CIRCUIT_BREAKER_ERRORS
)
);

Expand All @@ -945,7 +949,8 @@ public double getOverhead() {
),
equalTo(
"[parent] Data too large, data for [test] would be [-3], which is larger than the limit of [-6], "
+ "real usage: [-2], new bytes reserved: [-1/-1b], usages [child1=-7]"
+ "real usage: [-2], new bytes reserved: [-1/-1b], usages [child1=-7]; for more information, see "
+ ReferenceDocs.CIRCUIT_BREAKER_ERRORS
)
);
} finally {
Expand Down