MCPcopy Create free account
hub / github.com/apache/arrow / Flush

Method Flush

cpp/src/arrow/filesystem/azurefs.cc:1183–1201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1181 }
1182
1183 Status Flush() override {
1184 RETURN_NOT_OK(CheckClosed("flush"));
1185 if (!initialised_) {
1186 // If the stream has not been successfully initialized then there is nothing to
1187 // flush. This also avoids some unhandled errors when flushing in the destructor.
1188 return Status::OK();
1189 }
1190
1191 Future<> pending_blocks_completed;
1192 {
1193 std::unique_lock<std::mutex> lock(upload_state_->mutex);
1194 pending_blocks_completed = upload_state_->pending_blocks_completed;
1195 }
1196
1197 RETURN_NOT_OK(pending_blocks_completed.status());
1198 std::unique_lock<std::mutex> lock(upload_state_->mutex);
1199 return CommitBlockList(block_blob_client_, upload_state_->block_ids,
1200 commit_block_list_options_);
1201 }
1202
1203 Future<> FlushAsync() {
1204 RETURN_NOT_OK(CheckClosed("flush async"));

Callers

nothing calls this directly

Calls 4

CommitBlockListFunction · 0.85
CheckClosedFunction · 0.50
OKFunction · 0.50
statusMethod · 0.45

Tested by

no test coverage detected