Skip to content

Commit 3d1d970

Browse files
committed
Fixed synchronizing REST API inflight breaker names with internal variable
The internal configuration settings were like that: network.breaker.inflight_requests But the exposed REST API had the value names with underscore like that: network.breaker.in_flight_requests This was now corrected to without underscores like that: network.breaker.inflight_requests
1 parent daffcf1 commit 3d1d970

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

docs/reference/migration/migrate_8_0.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ coming[8.0.0]
1313

1414
* <<breaking_80_analysis_changes>>
1515
* <<breaking_80_allocation_changes>>
16+
* <<breaking_80_breaker_changes>>
1617
* <<breaking_80_discovery_changes>>
1718
* <<breaking_80_mappings_changes>>
1819
* <<breaking_80_packaging_changes>>
@@ -53,6 +54,7 @@ Elasticsearch 7.x in order to be readable by Elasticsearch 8.x.
5354

5455
include::migrate_8_0/analysis.asciidoc[]
5556
include::migrate_8_0/allocation.asciidoc[]
57+
include::migrate_8_0/breaker.asciidoc[]
5658
include::migrate_8_0/discovery.asciidoc[]
5759
include::migrate_8_0/mappings.asciidoc[]
5860
include::migrate_8_0/packaging.asciidoc[]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[float]
2+
[[breaking_80_breaker_changes]]
3+
=== Packaging changes
4+
5+
//tag::notable-breaking-changes[]
6+
[float]
7+
==== In Flight Request Circuit Breaker
8+
9+
The name of the in flight requests circuit breaker in log output and diagnostic APIs (such as the node stats API) changes from `in_flight_requests` to `inflight_requests` to align it with the name of the corresponding settings.
10+
11+
//end::notable-breaking-changes[]

server/src/main/java/org/elasticsearch/common/breaker/CircuitBreaker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public interface CircuitBreaker {
5353
* The in-flight request breaker tracks bytes allocated for reading and
5454
* writing requests on the network layer.
5555
*/
56-
String IN_FLIGHT_REQUESTS = "in_flight_requests";
56+
String IN_FLIGHT_REQUESTS = "inflight_requests";
5757
/**
5858
* The accounting breaker tracks things held in memory that is independent
5959
* of the request lifecycle. This includes memory used by Lucene for

server/src/test/java/org/elasticsearch/indices/breaker/HierarchyCircuitBreakerServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public void testBorrowingSiblingBreakerMemory() throws Exception {
201201
assertThat(exception.getMessage(), containsString("[parent] Data too large, data for [should break] would be"));
202202
assertThat(exception.getMessage(), containsString("which is larger than the limit of [209715200/200mb]"));
203203
assertThat(exception.getMessage(),
204-
containsString("usages [request=157286400/150mb, fielddata=54001664/51.5mb, in_flight_requests=0/0b, accounting=0/0b]"));
204+
containsString("usages [request=157286400/150mb, fielddata=54001664/51.5mb, accounting=0/0b, inflight_requests=0/0b]"));
205205
assertThat(exception.getDurability(), equalTo(CircuitBreaker.Durability.TRANSIENT));
206206
}
207207
}
@@ -249,7 +249,7 @@ long currentMemoryUsage() {
249249
final long requestCircuitBreakerUsed = (requestBreaker.getUsed() + reservationInBytes) * 2;
250250
assertThat(exception.getMessage(),
251251
containsString("usages [request=" + requestCircuitBreakerUsed + "/" + new ByteSizeValue(requestCircuitBreakerUsed) +
252-
", fielddata=0/0b, in_flight_requests=0/0b, accounting=0/0b]"));
252+
", fielddata=0/0b, accounting=0/0b, inflight_requests=0/0b]"));
253253
assertThat(exception.getDurability(), equalTo(CircuitBreaker.Durability.TRANSIENT));
254254
assertEquals(0, requestBreaker.getTrippedCount());
255255
assertEquals(1, service.stats().getStats(CircuitBreaker.PARENT).getTrippedCount());

0 commit comments

Comments
 (0)