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

Method FlushAsync

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

Source from the content-addressed store, hash-verified

1201 }
1202
1203 Future<> FlushAsync() {
1204 RETURN_NOT_OK(CheckClosed("flush async"));
1205 if (!initialised_) {
1206 // If the stream has not been successfully initialized then there is nothing to
1207 // flush. This also avoids some unhandled errors when flushing in the destructor.
1208 return Status::OK();
1209 }
1210
1211 Future<> pending_blocks_completed;
1212 {
1213 std::unique_lock<std::mutex> lock(upload_state_->mutex);
1214 pending_blocks_completed = upload_state_->pending_blocks_completed;
1215 }
1216
1217 return pending_blocks_completed.Then([self = Self()] {
1218 std::unique_lock<std::mutex> lock(self->upload_state_->mutex);
1219 return CommitBlockList(self->block_blob_client_, self->upload_state_->block_ids,
1220 self->commit_block_list_options_);
1221 });
1222 }
1223
1224 private:
1225 Status AppendCurrentBlock() {

Callers

nothing calls this directly

Calls 4

CommitBlockListFunction · 0.85
ThenMethod · 0.80
CheckClosedFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected