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

Stop blocking batchTracker on chan when DoBatch() gets cancelled #1641

Merged
merged 1 commit into from
Sep 5, 2019

Conversation

bboreham
Copy link
Contributor

@bboreham bboreham commented Sep 2, 2019

Fixes #1640

batchTracker.record() is written so there will only be one send on each chan, but if ctx.Done() happens before either then DoBatch() returns so we need 1 slot in each chan to be able to send without blocking when nobody is receiving.

`batchTracker.record()` is written so there will only be one send on
each chan, but if `ctx.Done()` happens before either then `DoBatch()`
returns so we need 1 slot in each chan to be able to send without
blocking when nobody is receiving.

Signed-off-by: Bryan Boreham <bryan@weave.works>
@bboreham bboreham merged commit 20939b8 into master Sep 5, 2019
@bboreham bboreham deleted the batch-chans branch September 5, 2019 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Distributor leaks goroutines if incoming call times out
3 participants