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

Try to bounds the stream between the receiver and the PACK decoder #608

Merged
merged 2 commits into from
Dec 23, 2022

Conversation

dinosaure
Copy link
Member

Already spotted into multipart_form but currently, the stream of the PACK file is not bound. The side effect is: lwt does not really do the concurrence between the receiving and the decoding and we need to limit how many chunks we can have into our stream. So we use Lwt_stream.bounded_push.

The final expectation is to give opportunities to some processes to run even if we started to decode the PACK file. Now, the decoding is highly bound to the receiver (the socket) which can block. That mostly means that, by transitivity, the decoder can block too and let opportunities to some other processes.

@dinosaure dinosaure merged commit 627ae72 into master Dec 23, 2022
@dinosaure dinosaure deleted the bounds-stream branch December 23, 2022 16:57
@hannesm
Copy link
Member

hannesm commented Jan 9, 2023

thanks for working on this, and merging it. would you mind to cut a release of git with this PR included?

dinosaure added a commit to dinosaure/opam-repository that referenced this pull request Jan 10, 2023
CHANGES:

- Limit the stream between the incoming flow and the PACK analyzer
  It will bind the analyze with the I/O throughput (@dinosaure, mirage/ocaml-git#608)
- Remove OCaml 5.0.0 warnings (@samoht, mirage/ocaml-git#609)
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.

2 participants