Skip to content

DATAMONGO-2393 - Fix GridFS upload and download adapters #799

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

Closed
wants to merge 7 commits into from

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Oct 21, 2019

Use drain loop for same-thread processing in GridFS download stream.

We now rely on an outer drain-loop when GridFS reads complete on the same thread instead of using recursive subscriptions to avoid StackOverflow. Previously, we recursively invoked subscriptions that lead to an increased stack size.

AsyncInputStreamAdapter now properly splits and buffers incoming DataBuffers according to the read requests of AsyncInputStream.read(…) calls.
Previously, the adapter used the input buffer size to be used as the output buffer size. A larger DataBuffer than the transfer buffer handed in through read(…) caused a BufferOverflow.

Support configurable chunk size.

We now allow consuming GridFS files using a configurable chunk size. The default chunk size is now 256kb.


Should be backported to 2.2.x.

Related ticket: DATAMONGO-2393.

@mp911de mp911de changed the title DATAMONGO-2393 - Fix GridFS upload and download adapters. DATAMONGO-2393 - Fix GridFS upload and download adapters Oct 21, 2019
christophstrobl and others added 6 commits October 22, 2019 13:39
Execution time and test order changed by using JUnit5. This commit fixes some of the issues related to index creation where actually not needed.
…download stream.

We now rely on an outer drain-loop when GridFS reads complete on the same thread instead of using recursive subscriptions to avoid StackOverflow. Previously, we recursively invoked subscriptions that lead to an increased stack size.
AsyncInputStreamAdapter now properly splits and buffers incoming DataBuffers according the read requests of AsyncInputStream.read(…) calls.
Previously, the adapter used the input buffer size to be used as the output buffer size. A larger DataBuffer than the transfer buffer handed in through read(…) caused a BufferOverflow.
Extract read requests into inner class.
We now allow consuming GridFS files using a configurable chunk size. The default chunk size is now 256kb.
christophstrobl pushed a commit that referenced this pull request Oct 31, 2019
…download stream.

We now rely on an outer drain-loop when GridFS reads complete on the same thread instead of using recursive subscriptions to avoid StackOverflow. Previously, we recursively invoked subscriptions that lead to an increased stack size.

Original Pull Request: #799
christophstrobl pushed a commit that referenced this pull request Oct 31, 2019
AsyncInputStreamAdapter now properly splits and buffers incoming DataBuffers according the read requests of AsyncInputStream.read(…) calls.
Previously, the adapter used the input buffer size to be used as the output buffer size. A larger DataBuffer than the transfer buffer handed in through read(…) caused a BufferOverflow.

Original Pull Request: #799
christophstrobl pushed a commit that referenced this pull request Oct 31, 2019
Extract read requests into inner class.

Original Pull Request: #799
christophstrobl pushed a commit that referenced this pull request Oct 31, 2019
We now allow consuming GridFS files using a configurable chunk size. The default chunk size is now 256kb.

Original Pull Request: #799
christophstrobl added a commit that referenced this pull request Oct 31, 2019
christophstrobl pushed a commit that referenced this pull request Oct 31, 2019
…download stream.

We now rely on an outer drain-loop when GridFS reads complete on the same thread instead of using recursive subscriptions to avoid StackOverflow. Previously, we recursively invoked subscriptions that lead to an increased stack size.

Original Pull Request: #799
christophstrobl pushed a commit that referenced this pull request Oct 31, 2019
AsyncInputStreamAdapter now properly splits and buffers incoming DataBuffers according the read requests of AsyncInputStream.read(…) calls.
Previously, the adapter used the input buffer size to be used as the output buffer size. A larger DataBuffer than the transfer buffer handed in through read(…) caused a BufferOverflow.

Original Pull Request: #799
christophstrobl pushed a commit that referenced this pull request Oct 31, 2019
Extract read requests into inner class.

Original Pull Request: #799
christophstrobl pushed a commit that referenced this pull request Oct 31, 2019
We now allow consuming GridFS files using a configurable chunk size. The default chunk size is now 256kb.

Original Pull Request: #799
christophstrobl added a commit that referenced this pull request Oct 31, 2019
@christophstrobl christophstrobl deleted the issue/DATAMONGO-2393 branch October 31, 2019 12:12
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