Skip to content

Commit

Permalink
Fixed synchronizing REST API inflight breaker names with internal var…
Browse files Browse the repository at this point in the history
…iable (#40878)

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
  • Loading branch information
111andre111 authored Sep 3, 2019
1 parent 4d67dae commit 5ec9d7b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/reference/migration/migrate_8_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ coming[8.0.0]

* <<breaking_80_analysis_changes>>
* <<breaking_80_allocation_changes>>
* <<breaking_80_breaker_changes>>
* <<breaking_80_discovery_changes>>
* <<breaking_80_mappings_changes>>
* <<breaking_80_packaging_changes>>
Expand Down Expand Up @@ -53,6 +54,7 @@ Elasticsearch 7.x in order to be readable by Elasticsearch 8.x.

include::migrate_8_0/analysis.asciidoc[]
include::migrate_8_0/allocation.asciidoc[]
include::migrate_8_0/breaker.asciidoc[]
include::migrate_8_0/discovery.asciidoc[]
include::migrate_8_0/mappings.asciidoc[]
include::migrate_8_0/packaging.asciidoc[]
Expand Down
11 changes: 11 additions & 0 deletions docs/reference/migration/migrate_8_0/breaker.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[float]
[[breaking_80_breaker_changes]]
=== Packaging changes

//tag::notable-breaking-changes[]
[float]
==== In Flight Request Circuit Breaker

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.

//end::notable-breaking-changes[]
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public interface CircuitBreaker {
* The in-flight request breaker tracks bytes allocated for reading and
* writing requests on the network layer.
*/
String IN_FLIGHT_REQUESTS = "in_flight_requests";
String IN_FLIGHT_REQUESTS = "inflight_requests";
/**
* The accounting breaker tracks things held in memory that is independent
* of the request lifecycle. This includes memory used by Lucene for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public void testBorrowingSiblingBreakerMemory() throws Exception {
assertThat(exception.getMessage(), containsString("[parent] Data too large, data for [should break] would be"));
assertThat(exception.getMessage(), containsString("which is larger than the limit of [209715200/200mb]"));
assertThat(exception.getMessage(),
containsString("usages [request=157286400/150mb, fielddata=54001664/51.5mb, in_flight_requests=0/0b, accounting=0/0b]"));
containsString("usages [request=157286400/150mb, fielddata=54001664/51.5mb, accounting=0/0b, inflight_requests=0/0b]"));
assertThat(exception.getDurability(), equalTo(CircuitBreaker.Durability.TRANSIENT));
}
}
Expand Down Expand Up @@ -249,7 +249,7 @@ long currentMemoryUsage() {
final long requestCircuitBreakerUsed = (requestBreaker.getUsed() + reservationInBytes) * 2;
assertThat(exception.getMessage(),
containsString("usages [request=" + requestCircuitBreakerUsed + "/" + new ByteSizeValue(requestCircuitBreakerUsed) +
", fielddata=0/0b, in_flight_requests=0/0b, accounting=0/0b]"));
", fielddata=0/0b, accounting=0/0b, inflight_requests=0/0b]"));
assertThat(exception.getDurability(), equalTo(CircuitBreaker.Durability.TRANSIENT));
assertEquals(0, requestBreaker.getTrippedCount());
assertEquals(1, service.stats().getStats(CircuitBreaker.PARENT).getTrippedCount());
Expand Down

0 comments on commit 5ec9d7b

Please sign in to comment.