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

transmission freezes when response channel is full #74

Open
rasviitanen opened this issue Mar 11, 2021 · 2 comments
Open

transmission freezes when response channel is full #74

rasviitanen opened this issue Mar 11, 2021 · 2 comments

Comments

@rasviitanen
Copy link

rasviitanen commented Mar 11, 2021

Description

We noticed an issue where the response channel will fill up and freeze the transmission if responses are not consumed.

A send call is used to send information to the response channel. It seems that the response channel is a bounded crossbeam-channel, so the sender's send function will block if the channel is full.

With a default sized channel, this occurs after 40000 events.

Meanwhile, the README states:

You don’t have to process responses if you’re not interested in them—simply ignoring them is perfectly safe. Unread responses will be dropped.

Code

response_sender
.send(Response {
status_code: None,
body: None,
duration: clock.elapsed(),
metadata: event.metadata,
error: Some(e.to_string()),
})

History

The bug seems to originate in this commit: 2f004da

Potential ideas

I would propose a solution where everything regarding the responses is put behind a feature flag and then explicitly state that you must consume the response channel if you activate the feature.

I would be happy to implement a fix.
Just let me know if you think the proposed idea would be a good fit for this project.

@Fishrock123
Copy link
Contributor

Other, easier to implement ideas for "just drop data if it's full":

@nlopes
Copy link
Owner

nlopes commented Mar 13, 2021

Thanks for sending. I'm about to do some work on merging a few PRs and then will look at this issue and consider a proposal.

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

No branches or pull requests

3 participants