Skip to content
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

Tweak AggregatorBase.addRequestCircuitBreakerBytes #25162

Merged
merged 1 commit into from Jun 12, 2017

Conversation

@dakrone
Copy link
Member

commented Jun 9, 2017

This modifies a method Mark added to the AggregatorBase that allows aggregations
to add additional memory tracking for datastructures used during execution. If
an aggregation would like to reclaim circuit breaker reserved bytes by adding a
negative number, addWithoutBreaking should be used instead of
addEstimateBytesAndMaybeBreak.

Resolves #24511

Copy link
Contributor

left a comment

Fine by me. This just saves the comparison, right? The old way would work but wasn't as efficient. I think.

I wonder about adding a test for this though I'm not sure exactly where I'd put it.

@dakrone

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2017

This just saves the comparison, right? The old way would work but wasn't as efficient. I think.

Yeah, addWithoutBreaking is a straight addAndGet while the other ones is a loop that adds, checks limit, then does compareAndSet in a loop.

I wonder about adding a test for this though I'm not sure exactly where I'd put it.

I'm not sure either, I think this is small enough not to worry about it.

This modifies a method Mark added to the AggregatorBase that allows aggregations
to add additional memory tracking for datastructures used during execution. If
an aggregation would like to reclaim circuit breaker reserved bytes by adding a
negative number, `addWithoutBreaking` should be used instead of
`addEstimateBytesAndMaybeBreak`.

Resolves #24511
@dakrone dakrone force-pushed the dakrone:tweak-addRequestCircuitBreakerBytes branch to ee1113c Jun 12, 2017
@dakrone dakrone merged commit ee1113c into elastic:master Jun 12, 2017
1 of 2 checks passed
1 of 2 checks passed
elasticsearch-ci Build started sha1 is merged.
Details
CLA Commit author has signed the CLA
Details
@clintongormley clintongormley added v6.0.0-beta1 and removed v6.0.0 labels Jul 25, 2017
@dakrone dakrone deleted the dakrone:tweak-addRequestCircuitBreakerBytes branch Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.