-
Notifications
You must be signed in to change notification settings - Fork 6
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] Prevent FS write from draining Resources content #22
Merged
+491
−139
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RandomByte
force-pushed
the
fix/write-should-not-drain-stream
branch
from
July 17, 2018 15:23
2b66262
to
3a7c6a7
Compare
RandomByte
force-pushed
the
fix/write-should-not-drain-stream
branch
3 times, most recently
from
August 20, 2018 15:21
56ba0ba
to
efd6928
Compare
RandomByte
force-pushed
the
fix/write-should-not-drain-stream
branch
from
August 20, 2018 15:28
efd6928
to
58777e8
Compare
RandomByte
force-pushed
the
fix/write-should-not-drain-stream
branch
2 times, most recently
from
January 31, 2019 15:05
d24a55e
to
36b8d29
Compare
Previously, when writing to an FS-Adapter, a Resources content stream would be drained, making it impossible to access a Resources content again. With this change, by default a Resources content will be buffered while draining its content stream. An optional 'drain' parameter can be supplied to skip buffering to lower the memory demand of the operation in cases where further access to the resource content is not required. Alternatively, an optional 'readOnly' parameter can be supplied to skip buffering and instead create a new readable stream of the written file. The file will be written with '444' (read only) permissions. This can also help reducing memory usage. Add a pessimistic check for drained content streams. Refactor FS- and memory adapter unit tests.
RandomByte
force-pushed
the
fix/write-should-not-drain-stream
branch
from
January 31, 2019 15:20
36b8d29
to
65da854
Compare
Ready for review |
matz3
requested changes
Jan 31, 2019
matz3
approved these changes
Jan 31, 2019
For future reference: Some more clarification on the issue this PR resolves can be found here: SAP/ui5-builder#42 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, when writing to an FS-Adapter, a Resources content stream
would be drained, making it impossible to access a Resources content
again.
With this change, by default a Resources content will be buffered while
draining its content stream.
An optional 'drain' parameter can be supplied to skip buffering to lower
the memory demand of the operation in cases where further access to the
resource content is not required.
Alternatively, an optional 'readOnly' parameter can be supplied to skip
buffering and instead create a new readable stream of the written file.
The file will be written with '444' (read only) permissions. This can
also help reducing memory usage.
Add a pessimistic check for drained content streams.
Refactor FS- and memory adapter unit tests.
Resolves blocker for SAP/ui5-builder#42