storage: Out of memory when `upload_chunk_size` is set to 0
stanhu opened this issue · 1 comments
stanhu commented
Environment details
- OS: Linux
- Ruby version: 2.7.7
- Gem name and version: google-apis-core 0.10.0
Steps to reproduce
- Set
Google::Apis::RequestOptions.default.upload_chunk_size = 0
. - Attempt to upload a 10 GB file.
#13283 added support for disabling chunking. However, instead of opening and passing in an IO
object, the upload attempts to read the entire file:
I think the right thing to do is pass along the unfettered upload_io
if upload_chunk_size
is 0 instead of reading the entire chunk.
cc: @bajajneha27, @dazuma