Skip to content

Conversation

@H-Shay
Copy link
Contributor

@H-Shay H-Shay commented Jun 19, 2024

based on https://github.com/element-hq/synapse/compare/erikj/fixup_multipart

#17172 changed the storage provider fetch API, which caused breakage in 3rd party storage providers.
This PR fixes that by removing the change to the api, and adding a multipart file consumer which consumes a file stream and converts it to mulipart before streaming that out to the requester.

@H-Shay H-Shay requested a review from a team as a code owner June 19, 2024 04:58
self.producer = producer
self.streaming = streaming

self.wrapped_consumer.registerProducer(self, streaming)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
self.wrapped_consumer.registerProducer(self, streaming)
self.wrapped_consumer.registerProducer(self, True)

Would be good to know why you changed it to this. My understanding is that MultipartFileConsumer operates as a IPushProducer irrespective of what producer is, and so we should we always set the streaming flag in registerProducer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So this was a change that I made after I ran an integration test and found that the file streaming response was hanging indefinitely causing the original request to time out - changing it to this worked and so I didn't think much about it, but it sounds like maybe I need to investigate further...

@H-Shay H-Shay closed this Jun 20, 2024
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