Skip to content

Fixed synchronizing inflight breaker with internal variable #40878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2019
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
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