TransferManager::DoSinglePartDownload() should flush the stream before marking the transfer completed #1732
Labels
bug
This issue is a bug.
needs-reproduction
This issue needs reproduction.
p2
This is a standard priority issue
TransferManager::DoSinglePartDownload()
marks the transfer as completed here: https://github.com/rockset/rocksdb-cloud/blob/8c0ff476d77c0df0af92b1466269404bdfb8e89e/cloud/aws/aws_s3.cc#L196This happens before the underlying response stream is flushed. The response stream's ownership is tied to local variable
getObjectOutcome
and the stream is flushed only ingetObjectOutcome
's destructor when it out of scope (here:aws-sdk-cpp/aws-cpp-sdk-core/source/utils/stream/ResponseStream.cpp
Line 61 in 5543842
This means that a code that uses
std::fstream
to download S3 object to a local file and does:is incorrect, because the file might not be flushed when
WaitUntilFinished()
returns.This is similar to this 6 year old bug: #58
The text was updated successfully, but these errors were encountered: