-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Downloads backend] are we close
ing streams correctly?
#433
Comments
I think maybe one thing to do is to just replace all usage of |
I think I may have found the reason for this. It turns out that But a closed julia> io = IOBuffer()
close(io)
read(io)
ERROR: ArgumentError: read failed, IOBuffer is not readable
... The underlying problem here may be that
See also JuliaLang/julia#24526 |
Another cross ref: It's a known bug that |
|
@vtjnash can you elaborate more? Unfortunately |
Using IOBuffer leaves you vulnerable to truncation and data loss. |
The exception is if you know that the data is being written synchronously (as HTTP does), as then you can treat the output as a file, instead of expecting a stream. |
I'll mention I find |
The reason I was asking about |
Yes, because you can read immediately, it is vulnerable to losing your data (if it is concurrently used with |
384: Use `AWS.Response` to handle streaming/raw/parsing r=omus a=omus The idea is to use a struct in AWS.jl that can be used to handle the automatic parsing that is currently used to turn XML/JSON into a dict while also giving the option of accessing the raw output as a string or stream without all the keywords currently needed to be specified. Depends on: - #457 Related: - #346 - #348 - #438 Closes: - #224 - #433 - #468 (when using `use_response_type` the passed in I/O is not closed) - #471 - #433 Update: The tests in this PR run using the deprecated behaviour. Mainly I did that here to prove this change is non-breaking. For the updated tests see #458 Co-authored-by: Curtis Vogt <curtis.vogt@gmail.com>
As of AWS.jl 1.63.0 (#384) both the When not enabling the |
non-seekable I/O types specifically do not work when encountering errors: JuliaCloud/AWSS3.jl#249 |
Ref #396 (comment)
The text was updated successfully, but these errors were encountered: