Skip to content

Commit

Permalink
small self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
OliLay committed May 7, 2024
1 parent 5a75a53 commit 18d5273
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpp/src/arrow/filesystem/s3fs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,8 @@ class ObjectOutputStream final : public io::OutputStream {

Status Init() {
// Do nothing. We first want to wait until some data is written to decide if we want
// to use singe part upload (`PutObject`) or a multi part upload.
// to use single part upload (`UploadUsingSingleRequest`) or a multi part upload
// (x-times `UploadPart`).
upload_state_ = std::make_shared<UploadState>();
closed_ = false;

Expand Down Expand Up @@ -1680,7 +1681,7 @@ class ObjectOutputStream final : public io::OutputStream {

Status EnsureReadyToFlushFromClose() {
if (!ShouldBeMultipartUpload()) {
RETURN_NOT_OK(DirectlyUploadCurrentData());
RETURN_NOT_OK(UploadUsingSingleRequest());
} else if (current_part_) {
// Upload last part
RETURN_NOT_OK(CommitCurrentPart());
Expand Down Expand Up @@ -1845,7 +1846,7 @@ class ObjectOutputStream final : public io::OutputStream {
return UploadPart(buf);
}

Status DirectlyUploadCurrentData() {
Status UploadUsingSingleRequest() {
std::shared_ptr<Buffer> buf;
if (current_part_ == nullptr) {
// In case the stream is closed directly after it has been opened without writing
Expand Down

0 comments on commit 18d5273

Please sign in to comment.