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

fix(api): streaming chunk upload for long running connections #3047

Merged
merged 1 commit into from Jun 29, 2022

Conversation

aloknerurkar
Copy link
Contributor

@aloknerurkar aloknerurkar commented Jun 27, 2022

Currently, the /chunks/stream endpoint uses the HTTP request context which expires once the API returns. However, the websocket connection is expected to be alive for a longer time. This change allows clients to maintain long-running connections to upload a stream of chunks. The websocket connection is tracked using the wsWg in the api handler, so by passing a background context we allow the server read loop to be alive till the client closes the connection.


This change is Reviewable

@aloknerurkar aloknerurkar added the ready for review The PR is ready to be reviewed label Jun 27, 2022
Copy link
Contributor

@mrekucci mrekucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @acud)

@aloknerurkar aloknerurkar merged commit ff220b9 into master Jun 29, 2022
@aloknerurkar aloknerurkar deleted the streamupload.0 branch June 29, 2022 10:51
@aloknerurkar aloknerurkar added this to the 1.6.3 milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull-request ready for review The PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants