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

Refactor Reply usage to be unbounded #205

Closed
chipsenkbeil opened this issue Jun 18, 2023 · 1 comment · Fixed by #207
Closed

Refactor Reply usage to be unbounded #205

chipsenkbeil opened this issue Jun 18, 2023 · 1 comment · Fixed by #207
Labels
refactor Refactor portions of codebase
Milestone

Comments

@chipsenkbeil
Copy link
Owner

chipsenkbeil commented Jun 18, 2023

There's a lot of bounded mpsc channels through distant, and this causes issues where we need to support async waiting, defining arbitrary channel sizes, and take extra care when blocking for some reason.

In reality, only the public-facing channels should be bounded to avoid poor user implementations. Granted, a blocking, bounded channel can signal a growing, unprocessed list; however, the most recent blockage seems to be coming from a ServerReply, and the thought is to not restrict replies.

We're going to start by modifying ServerReply to be non-async and non-blocking using the unbounded sender. This will also change some of the Mutex usages to be the standard library version, which tokio documentation describes as totally fine to do for data modifications (not database connections, etc) without passing across .await calls.

@chipsenkbeil chipsenkbeil added the refactor Refactor portions of codebase label Jun 18, 2023
@chipsenkbeil chipsenkbeil added this to the 0.20 milestone Jun 18, 2023
@chipsenkbeil chipsenkbeil changed the title Refactor most mpsc usage to be unbounded Refactor Reply usage to be unbounded Jun 19, 2023
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactor Refactor portions of codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant