Skip to content

Commit

Permalink
Emit log message when parent circuit breaker trips (#47000)
Browse files Browse the repository at this point in the history
We emit a debug log message whenever a child circuit breaker trips (in
`ChildMemoryCircuitBreaker#circuitBreak(String, long)`) but we never
emit a log message when the parent circuit breaker trips. As this is
more likely to happen with the real memory circuit breaker it is not
possible to detect this in the logs. With this commit we add a log
message on the same log level (debug) when the parent circuit breaker
trips.
  • Loading branch information
danielmitterdorfer authored Sep 25, 2019
1 parent 169ac92 commit 1447027
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ public void checkParentLimit(long newBytesReserved, String label) throws Circuit
// child circuit breakers is categorized as transient or permanent.
CircuitBreaker.Durability durability = memoryUsed.transientChildUsage >= memoryUsed.permanentChildUsage ?
CircuitBreaker.Durability.TRANSIENT : CircuitBreaker.Durability.PERMANENT;
logger.debug("{}", message);
throw new CircuitBreakingException(message.toString(), memoryUsed.totalUsage, parentLimit, durability);
}
}
Expand Down

0 comments on commit 1447027

Please sign in to comment.