In the method of ChildMemoryCircuitBreaker.addEstimateBytesAndMaybeBreak()
, the limit()
method would atomically compare and set the used
value.
when we test the high qps query to ES-node, the major cost is ChildMemoryCircuitBreaker.limit()
which cause to AggregationPhase.preProcess()
's cost is extremely high
If data node receive high qps complicated search request body, and data-node will be busy to create aggregator, and it will lead to SumAggregator.<init>
, lead to BigArrays.newDoubleArray()
and lead to BigArrays.adjustBreaker()
, finally call breaker.addEstimateBytesAndMaybeBreak
and ChildMemoryCircuitBreaker.limit()